PHP JackKnife Free Image Gallery Software
(NEW!)
JackKnife Hosting


Gallery Features

Download Gallery Software

Image Gallery FAQ

Requirements

Contact









Thank You!

Uses MySQL or MSSQL
Developed in PHP
Go to the first, previous, next, last section, table of contents.


D MySQL Change History

This appendix lists the changes from version to version in the MySQL source code.

We are now working actively on MySQL 4.1 and 5.0, and will provide only critical bugfixes for MySQL 4.0 and MySQL 3.23. We update this section as we add new features, so that everybody can follow the development.

Our TODO section contains what further plans we have for MySQL 4.1 and 5.0. See section C MySQL and the Future (the TODO).

Note that we tend to update the manual at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you can't find on our download page (http://dev.mysql.com/downloads/), it means that the version has not yet been released.

The date mentioned with a release version is the date of the last BitKeeper ChangeSet on which the release was based, not the date when the packages were made available. The binaries are usually made available a few days after the date of the tagged ChangeSet, because building and testing all packages takes some time.

D.1 Changes in release 5.0.x (Development)

The following changelog shows what has already been done in the 5.0 tree:

  • Basic support for read-only server side cursors.
  • Basic support for (updatable) views. See, for example, section 13.2.7 CREATE VIEW Syntax.
  • Basic support for stored procedures (SQL:2003 style). See section 19 Stored Procedures and Functions.
  • Initial support for rudimentary triggers.
  • Added SELECT INTO list_of_vars, which can be of mixed (that is, global and local) types. See section 19.1.6.3 SELECT ... INTO Statement.
  • Removed the update log. It is fully replaced by the binary log. If the MySQL server is started with --log-update, it will be translated to --log-bin (or ignored if the server is explicitly started with --log-bin), and a warning message will be written to the error log. Setting SQL_LOG_UPDATE will silently set SQL_LOG_BIN instead (or do nothing if the server is explicitly started with --log-bin).
  • User variable names are now case insensitive: If you do SET @a=10; then SELECT @A; will now return 10. Case sensitivity of a variable's value depends on the collation of the value.
  • Strict mode, which in essence means that you will get an error instead of a warning when inserting an incorrect value into a column. See section 5.2.2 The Server SQL Mode.
  • VARCHAR fields now remembers end space. A VARCHAR() field can now contain up to 65535 bytes.
  • When using a constant string or a function that generate a string result in CREATE ... SELECT, MySQL now creates the result field based on the max_length of the string/expression:
    max_length Column type
    = 0 CHAR(0)
    < 512 VARCHAR(max_length)
    >= 512 TEXT

For a full list of changes, please refer to the changelog sections for each individual 5.0.x release.

D.1.1 Changes in release 5.0.3 (not released yet)

Functionality added or changed:

  • Added cp932 (SJIS for Windows Japanese) and eucjpms (UJIS for Windows Japanese) character sets.
  • Added several InnoDB status variables. See section 5.2.4 Server Status Variables.
  • Added the FEDERATED storage engine. See section 14.6 The FEDERATED Storage Engine.
  • SHOW CREATE TABLE now uses USING index_type rather than TYPE index_type to specify an index type. (Bug #7233)
  • Added an error member to the MYSQL_BIND data structure that is used in the C API for prepared statements. This member is used for reporting data truncation errors. Truncation reporting is enabled via the new MYSQL_REPORT_DATA_TRUNCATION option for the mysql_options() C API function.
  • API change: the reconnect flag in the MYSQL structure is now set to 0 by mysql_real_connect(). Only those client programs which didn't explicitely set this flag to 0 or 1 after mysql_real_connect() will experience a change. Having automatic reconnection enabled by default was considered too dangerous (after reconnection, table locks, temporary tables, user and session variables are lost).
  • FLUSH TABLES WITH READ LOCK is now killable while it's waiting for running COMMIT statements to finish.
  • VARCHAR columns now remember end space. A VARCHAR() column can now contain up to 65535 bytes. For more details, see section D.1 Changes in release 5.0.x (Development). If the table handler doesn't support the new VARCHAR type, then it's converted to a CHAR column. Currently this happens for NDB and InnoDB tables.
  • InnoDB: Introduced a compact record format that does not store the number of columns or the lengths of fixed-size columns. The old format can be requested by specifying ROW_FORMAT=REDUNDANT. The new format (ROW_FORMAT=COMPACT) is the default.
  • InnoDB: Setting the initial AUTO_INCREMENT value for the table using CREATE TABLE...AUTO_INCREMENT = works now also for the InnoDB table.
  • Seconds_Behind_Master will be NULL (which means ``unknown'') if the slave SQL thread is not running, or if the slave I/O thread is not running or not connected to master. It will be zero if SQL thread has caught up on I/O thread. It no longer grows indefinitely if the master is idle.
  • The MySQL server aborts immediately instead of simply issuing a warning if it is started with the --log-bin option but cannot initialize the binary log at startup (that is, an error occurs when writing to the binary log file or binary log index file).
  • The binary log file and binary log index file now are handled the same way as MyISAM tables when there is a ``disk full'' or ``quota exceeded'' error. See section A.4.3 How MySQL Handles a Full Disk.
  • The MySQL server will now abort when started with option --log-bin-index and without --log-bin, and when started with --log-slave-updates and without --log-bin.
  • If the MySQL server is started without an argument to --log-bin and without --log-bin-index, thus not specifying a name for the binary log index file, a warning will be issued because MySQL will fall back to using the hostname for that name, and this is prone to replication issues if the server's hostname's gets changed later.
  • Added account-specific MAX_USER_CONNECTIONS limit, which allows to specify maximum number of concurrent connections for the account. Also now all limited resources are counted per account (instead of being counted per user + host pair as it was before). One can use --old-style-user-limits option to get old behavior.

Bugs fixed:

  • Fixed a bug in max_heap_table_size handling, that resulted in Table is full error when the table was still smaller than the limit. (Bug #7791).
  • Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. ( CAN-2005-0004)
  • Fixed a bug that caused server crash if some error occured during filling of temporary table created for derived table or view handling. (Bug #7413)
  • Fixed a bug which caused server crash if query containing CONVERT_TZ() function with constant arguments was prepared. (Bug #6849)
  • Prevent adding CREATE TABLE .. SELECT query to the binary log when the insertion of new records partially failed. (Bug #6682)
  • Fixed a bug which caused a crash when only the slave I/O thread was stopped and started. (Bug #6148)
  • Giving mysqld a SIGHUP caused it to crash.
  • Changed semantics of CREATE/ALTER/DROP DATABASE statements so that replication of CREATE DATABASE is possible when using --binlog-do-db and --binlog-ignore-db. (Bug #6391)
  • A sequence of BEGIN (or SET AUTOCOMMIT=0), FLUSH TABLES WITH READ LOCK, transactional update, COMMIT, FLUSH TABLES WITH READ LOCK could hang the connection forever and possibly the MySQL server itself. This happened for example when running the innobackup script several times. (Bug #6732)
  • mysqlbinlog did not print SET PSEUDO_THREAD_ID statements in front of LOAD DATA INFILE statements inserting into temporary tables, thus causing potential problems when rolling forward these statements after restoring a backup. (Bug #6671)
  • InnoDB: Fixed a bug no error message for ALTER with InnoDB and AUTO_INCREMENT (Bug #7061). InnoDB now supports ALTER TABLE...AUTO_INCREMENT = x query to set auto increment value for a table.
  • Made the MySQL server accept executing SHOW CREATE DATABASE even if the connection has an open transaction or locked tables; refusing it made mysqldump --single-transaction sometimes fail to print a complete CREATE DATABASE statement for some dumped databases. (Bug #7358)
  • Fixed that, when encountering a ``disk full'' or ``quota exceeded'' write error, MyISAM sometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714)
  • Fixed that --expire-log-days was not honored if using only transactions. (Bug #7236)
  • Fixed that a slave could crash after replicating many ANALYZE TABLE, OPTIMIZE TABLE, or REPAIR TABLE statements from the master. (Bug #6461, Bug #7658)

D.1.2 Changes in release 5.0.2 (01 Dec 2004)

Functionality added or changed:

  • Warning: Incompatible change! The precedence of NOT operator has changed so that expressions such as NOT a BETWEEN b AND c are parsed correctly as NOT (a BETWEEN b AND c) rather than as (NOT a) BETWEEN b AND c. The pre-5.0 higher-precedence behavior can be obtained by enabling the new HIGH_NOT_PRECEDENCE SQL mode.
  • Added IS [NOT] boolean_value syntax, where boolean_value is TRUE, FALSE, or UNKNOWN.
  • Added several InnoDB status variables. See section 5.2.4 Server Status Variables.
  • Implemented the WITH CHECK OPTION clause for CREATE VIEW.
  • CHECK TABLE now works for views.
  • The SCHEMA and SCHEMAS keywords are now accepted as synonyms for DATABASE and DATABASES.
  • Added initial support for rudimentary triggers (the CREATE TRIGGER and DROP TRIGGER statements).
  • Added basic support for read-only server side cursors.
  • mysqldump --single-transaction --master-data is now able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See section 8.8 The mysqldump Database Backup Program.
  • Added --start-datetime, --stop-datetime, --start-position, --stop-position options to mysqlbinlog (makes point-in-time recovery easier).
  • Made the MySQL server not react to signals SIGHUP and SIGQUIT on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals (reported as Bug #2030).
  • New --auto-increment-increment and --auto-increment-offset startup options. These allow you to set up a server to generate auto-increment values that don't conflict with another server.
  • MySQL now by default will check dates and only allow fully correct dates. If you want to MySQL to behave as default, you should enable the new ALLOW_INVALID_DATES SQL mode.
  • Added STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, and TRADITIONAL SQL modes. The TRADITIONAL mode is shorthand for all the preceding modes. When using mode TRADITIONAL, MySQL generates an error if you try to insert a wrong value in a column. It does not adjust the value to the closest possible legal value.
  • MySQL now remembers which columns were declared to have default values. In STRICT_TRANS_TABLES/STRICT_ALL_TABLES mode, you now get an error if you do an INSERT without specifying all columns that don't have a default value. A side effect of this is that when you do SHOW CREATE for a new table, you will no longer see a DEFAULT value for a column for which you didn't specify a default value.
  • The compilation flag DONT_USE_DEFAULT_FIELDS was removed because you can get the same behavior by setting the sql_mode system variable to STRICT_TRANS_TABLES.
  • Added NO_AUTO_CREATE_USER SQL mode to prevent GRANT from automatically creating new users if it would otherwise do so, unless a password also is specified.
  • We now detect too-large floating point numbers during statement parsing and generate an error messages for them.
  • Renamed the sql_updatable_view_key system variable to updatable_views_with_limit. This variable now can have only two values:
    • 1 or YES: Don't issue an error message (warning only) if a VIEW without presence of a key in the underlying table is used in queries with a LIMIT clause for updating. (This is the default value.)
    • 0 or NO: Prohibit update of a VIEW, which does not contain a key in the underlying table and the query uses a LIMIT clause (usually get from GUI tools).
  • Reverted output format of SHOW TABLES to old pre-5.0.1 format that did not include a table type column. To get the additional column that lists the table type, use SHOW FULL TABLES now.
  • The mysql_fix_privilege_tables script now initializes the global CREATE VIEW and SHOW VIEW privileges in the user table to the value of the CREATE privilege in that table.
  • If the server finds that the user table has not been upgraded to include the view-related privilege columns, it treats each account as having view privileges that are the same as its CREATE privilege.
  • InnoDB: If you specify the option innodb_locks_unsafe_for_binlog in `my.cnf', InnoDB in an UPDATE or a DELETE only locks the rows that it updates or deletes. This greatly reduces the probability of deadlocks.
  • A connection doing a rollback will now display "Rolling back" in the State column of SHOW PROCESSLIST.
  • mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, etc) before each LOAD DATA INFILE, like it already does for other queries; unless --short-form is used.

Bugs fixed:

  • Fixed that mysqlbinlog --read-from-remote-server sometimes couldn't accept two binary logfiles on the command line. (Bug #4507)
  • Fixed that mysqlbinlog --position --read-from-remote-server had incorrect # at lines. (Bug #4506)
  • Fixed that CREATE TABLE ... TYPE=HEAP ... AS SELECT... caused replication slave to stop. (Bug #4971)
  • Fixed that mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...) failed to disable LOAD DATA LOCAL INFILE. (Bug #5038)
  • Fixed that disable-local-infile option had no effect if client read it from a configuration file using mysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073)
  • Fixed that SET GLOBAL SYNC_BINLOG did not work on some platforms (Mac OS X). (Bug #5064)
  • Fixed that mysql-test-run failed on the rpl_trunc_binlog test if running test from the installed (the target of 'make install') directory. (Bug #5050)
  • Fixed that mysql-test-run failed on the grant_cache test when run as Unix user 'root'. (Bug #4678)
  • Fixed an unlikely deadlock which could happen when using KILL. (Bug #4810)
  • Fixed a crash when one connection got KILLed while it was doing START SLAVE. (Bug #4827)
  • Made FLUSH TABLES WITH READ LOCK block COMMIT if server is running with binary logging; this ensures that the binary log position can be trusted when doing a full backup of tables and the binary log. (Bug #4953)
  • Fixed that the counter of an auto_increment column was not reset by TRUNCATE TABLE is the table was a temporary one. (Bug #5033)
  • Fixed slave SQL thread so that the SET COLLATION_SERVER... statements it replicates don't advance its position (so that if it gets interrupted before the actual update query, it will later redo the SET). (Bug #5705)
  • Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug #5711)
  • Fixed that if a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it prints a message to the error log every 10 minutes, and waits until disk becomes free. (Bug #3248)
  • Fixed problem introduced in 4.0.21 where a connection starting a transaction, doing updates, then FLUSH TABLES WITH READ LOCK, then COMMIT, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDB innobackup script. (Bug #5949)
  • OPTIMIZE TABLE, REPAIR TABLE, and ANALYZE TABLE are now replicated without any error code in the binary log. (Bug #5551)
  • If a connection had an open transaction but had done no updates to transactional tables (for example if had just done a SELECT FOR UPDATE then executed a non-transactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714)
  • If a connection was interrupted by a network error and did a rollback, the network error code got stored into the BEGIN and ROLLBACK binary log events; that caused superfluous slave stops. (Bug #6522)

D.1.3 Changes in release 5.0.1 (27 Jul 2004)

Note: This build passes our test suite and fixes a lot of reported bugs found in the previous 5.0.0 release. However, please be aware that this is not a ``standard MYSQL build'' in the sense that there are still some open critical bugs in our bugs database at http://bugs.mysql.com/ that affect this release as well. We are actively fixing these and will make a new release where these are fixed as soon as possible. However, this binary should be a good candidate for testing new MySQL 5.0 features for future products.

Functionality added or changed:

  • Added support for read-only and updatable views based on a single table or other updatable views. View use requires that you upgrade your grant tables to add the view-related privileges. See section 2.10.7 Upgrading the Grant Tables.
  • Implemented a new ``greedy search'' optimizer that can significantly reduce the time spent on query optimization for some many-table joins. (You are affected if not only some particular SELECT is slow, but even using EXPLAIN for it takes a noticeable amount of time.) Two new system variables, optimizer_search_depth and optimizer_prune_level, can be used to fine-tune optimizer behavior.
  • Warning: Incompatible change! C API change: mysql_shutdown() now requires a second argument. This is a source-level incompatibility that affects how you compile client programs; it does not affect the ability of compiled clients to communicate with older servers. See section 21.2.3.52 mysql_shutdown().
  • A stored procedure is no longer ``global.'' That is, it now belongs to a specific database:
    • When a database is dropped, all routines belonging to that database are also dropped.
    • Procedure names may be qualified, for example, db.p()
    • When executed from another database, an implicit USE db_name is in effect.
    • Explicit USE db_name statements no longer are allowed in a stored procedure.
    See section 19 Stored Procedures and Functions.
  • Fixed SHOW TABLES output field name and values according to standard. Field name changed from Type to table_type, values are BASE TABLE, VIEW and ERROR. (Bug #4603)
  • Added the sql_updatable_view_key system variable.
  • Added the --replicate-same-server-id server option.
  • Added Last_query_cost status variable that reports optimizer cost for last compiled query.
  • Added the --to-last-log option to mysqlbinlog, for use in conjunction with --read-from-remote-server.
  • Added the --innodb-safe-binlog server option, which adds consistency guarantees between the content of InnoDB tables and the binary log. See section 5.9.4 The Binary Log.
  • OPTIMIZE TABLE for InnoDB tables is now mapped to ALTER TABLE instead of ANALYZE TABLE.
  • sync_frm is now a settable global variable (not only a startup option).
  • For replication of MEMORY (HEAP) tables: Made the master automatically write a DELETE FROM statement to its binary log when a MEMORY table is opened for the first time since master's startup. This is for the case where the slave has replicated a non-empty MEMORY table, then the master is shut down and restarted: the table is now empty on master; the DELETE FROM empties it on slave too. Note that even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. But if you use the --init-file option to populate the MEMORY table on the master at startup, it ensures that the failing time interval is zero. (Bug #2477)
  • When a session having open temporary tables terminates, the statement automatically written to the binary log is now DROP TEMPORARY TABLE IF EXISTS instead of DROP TEMPORARY TABLE, for more robustness.
  • The MySQL server now returns an error if SET SQL_LOG_BIN is issued by a user without the SUPER privilege (in previous versions it just silently ignored the statement in this case).
  • Changed that when the MySQL server has binary logging disabled (that is, no --log-bin option was used), then no transaction binary log cache is allocated for connections. This should save binlog_cache_size bytes of memory (32KB by default) for every connection.
  • Added the sync_binlog=N global variable and startup option, which makes the MySQL server synchronize its binary log to disk (fdatasync()) after every Nth write to the binary log.
  • Changed the slave SQL thread to print less useless error messages (no more message duplication; no more messages when an error is skipped because of slave-skip-errors).
  • DROP DATABASE IF EXISTS, DROP TABLE IF EXISTS, single-table DELETE, and single-table UPDATE now are written to the binary log even if they changed nothing on the master (for example, even if a DELETE matched no rows). The old behavior sometimes caused bad surprises in replication setups.
  • Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See section 6.7 Replication Features and Known Problems.
  • Killing a CHECK TABLE statement does not result in the table being marked as ``corrupted'' any more; the table remains as if CHECK TABLE had not even started. See section 13.5.5.3 KILL Syntax.

Bugs fixed:

  • Strange results with index (x, y) ... WHERE x=val_1 AND y>=val_2 ORDER BY pk; (Bug #3155)
  • Subquery and order by (Bug #3118)
  • ALTER DATABASE caused the client to hang if the database did not exist. (Bug #2333)
  • SLAVE START (which is a deprecated syntax, START SLAVE should be used instead) could crash the slave. (Bug #2516)
  • Multiple-table DELETE statements were never replicated by the slave if there were any --replicate-*-table options. (Bug #2527)
  • The MySQL server did not report any error if a statement (submitted through mysql_real_query() or mysql_stmt_prepare()) was terminated by garbage characters. This can happen if you pass a wrong length parameter to these functions. The result was that the garbage characters were written into the binary log. (Bug #2703)
  • Replication: If a client connects to a slave server and issues an administrative statement for a table (for example, OPTIMIZE TABLE or REPAIR TABLE), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must use START SLAVE to get replication going again. (Bug #1858)
  • Made clearer the error message that one gets when an update is refused because of the --read-only option. (Bug #2757)
  • Fixed that --replicate-wild-*-table rules apply to ALTER DATABASE when the table pattern is %, as is already the case for CREATE DATABASE and DROP DATABASE. (Bug #3000)
  • Fixed that when a Rotate event is found by the slave SQL thread in the middle of a transaction, the value of Relay_Log_Pos in SHOW SLAVE STATUS remains correct. (Bug #3017)
  • Corrected the master's binary log position that InnoDB reports when it is doing a crash recovery on a slave server. (Bug #3015)
  • Changed the column Seconds_Behind_Master in SHOW SLAVE STATUS to never show a value of -1. (Bug #2826)
  • Changed that when a DROP TEMPORARY TABLE statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing a SELECT on the master does not result in a superfluous error on the slave). (Bug #3063)
  • Changed that when a thread handling INSERT DELAYED (also known as a delayed_insert thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug #3081)
  • Fixed deadlock when two START SLAVE commands were run at the same time. (Bug #2921)
  • Fixed that a statement never triggers a superfluous error on the slave, if it must be excluded given the --replicate-* options. The bug was that if the statement had been killed on the master, the slave would stop. (Bug #2983)
  • The --local-load option of mysqlbinlog now requires an argument.
  • Fixed a segmentation fault when running LOAD DATA FROM MASTER after RESET SLAVE. (Bug #2922)
  • mysqlbinlog --read-from-remote-server read all binary logs following the one that was requested. It now stops at the end of the requested file, the same as it does when reading a local binary log. There is an option --to-last-log to get the old behavior. (Bug #3204)
  • Fixed mysqlbinlog --read-from-remote-server to print the exact positions of events in the "at #" lines. (Bug #3214)
  • Fixed a rare error condition that caused the slave SQL thread spuriously to print the message Binlog has bad magic number and stop when it was not necessary to do so. (Bug #3401)
  • Fixed mysqlbinlog not to forget to print a USE statement under rare circumstances where the binary log contained a LOAD DATA INFILE statement. (Bug #3415)
  • Fixed a memory corruption when replicating a LOAD DATA INFILE when the master had version 3.23. (Bug #3422)
  • Multiple-table DELETE statements were always replicated by the slave if there were some --replicate-*-ignore-table options and no --replicate-*-do-table options. (Bug #3461)
  • Fixed a crash of the MySQL slave server when it was built with --with-debug and replicating itself. (Bug #3568)
  • Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug #3357)
  • If server-id was not set using startup options but with SET GLOBAL, the replication slave still complained that it was not set. (Bug #3829)
  • mysql_fix_privilege_tables didn't correctly handle the argument of its --password=# option. (Bug #4240)
  • 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)
  • mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug #3875)
  • Fixed incorrect destruction of expression that led to a server crash on complex AND/OR expressions if query was ignored (either by a replication server because of --replicate-*-table rules, or by any MySQL server because of a syntax error). (Bug #3969, Bug #4494)
  • If CREATE TEMPORARY TABLE t SELECT failed while loading the data, the temporary table was not dropped. (Bug #4551)
  • Fixed that when a multiple-table DROP TABLE failed to drop a table on the master server, the error code was not written to the binary log. (Bug #4553)
  • When the slave SQL thread was replicating a LOAD DATA INFILE statement, it didn't show the statement in the output of SHOW PROCESSLIST. (Bug #4326)

D.1.4 Changes in release 5.0.0 (22 Dec 2003: Alpha)

Functionality added or changed:

  • The KILL statement now takes CONNECTION and QUERY modifiers. The first is the same as KILL with no modifier (it kills a given connection thread). The second kills only the statement currently being executed by the connection.
  • Added TIMESTAMPADD() and TIMESTAMPDIFF() functions.
  • Added WEEK and QUARTER values as INTERVAL arguments for the DATE_ADD() and DATE_SUB() functions.
  • New binary log format that enables replication of these session variables: sql_mode, SQL_AUTO_IS_NULL, FOREIGN_KEY_CHECKS (which was already replicated since 4.0.14, but here it's done more efficiently and takes less space in the binary logs), UNIQUE_CHECKS. Other variables (like character sets, SQL_SELECT_LIMIT, ...) will be replicated in upcoming 5.0.x releases.
  • Implemented Index Merge optimization for OR clauses. See section 7.2.6 Index Merge Optimization.
  • Basic support for stored procedures (SQL:2003 style). See section 19 Stored Procedures and Functions.
  • Added SELECT INTO list_of_vars, which can be of mixed (that is, global and local) types. See section 19.1.6.3 SELECT ... INTO Statement.
  • Easier replication upgrade (5.0.0 masters can read older binary logs and 5.0.0 slaves can read older relay logs). See section 6.5 Replication Compatibility Between MySQL Versions for more details). The format of the binary log and relay log is changed compared to that of MySQL 4.1 and older.
  • Important note: If you upgrade to MySQL 4.1.1 or higher, it is difficult to downgrade back to 4.0 or 4.1.0! That is because, for earlier versions, InnoDB is not aware of multiple tablespaces.

Bugs fixed:

D.2 Changes in release 4.1.x (Production)

Version 4.1 of the MySQL server includes many enhancements and new features. Binaries for this version are available for download at http://dev.mysql.com/downloads/mysql-4.1.html.

  • Subqueries and derived tables (unnamed views). See section 13.1.8 Subquery Syntax.
  • INSERT ... ON DUPLICATE KEY UPDATE ... syntax. This allows you to UPDATE an existing row if the insert would cause a duplicate value in a PRIMARY or UNIQUE key. (REPLACE allows you to overwrite an existing row, which is something entirely different.) See section 13.1.4 INSERT Syntax.
  • A newly designed GROUP_CONCAT() aggregate function. See section 12.9 Functions and Modifiers for Use with GROUP BY Clauses.
  • Extensive Unicode (UTF8) support.
  • Table names and column names now are stored in UTF8. This makes MySQL more flexible, but might cause some problems upgrading if you have table or column names that use characters outside of the standard 7-bit US-ASCII range. See section 2.10.2 Upgrading from Version 4.0 to 4.1.
  • Character sets can be defined per column, table, and database.
  • New key cache for MyISAM tables with many tunable parameters. You can have multiple key caches, preload index into caches for batches...
  • BTREE index on HEAP tables.
  • Support for OpenGIS spatial types (geographical data). See section 18 Spatial Extensions in MySQL.
  • SHOW WARNINGS shows warnings for the last command. See section 13.5.4.20 SHOW WARNINGS Syntax.
  • Faster binary protocol with prepared statements and parameter binding. See section 21.2.4 C API Prepared Statements.
  • You can now issue multiple statements with a single C API call and then read the results in one go. See section 21.2.9 C API Handling of Multiple Query Execution.
  • Create Table: CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table2 LIKE table1.
  • Server based HELP command that can be used in the mysql command-line client (and other clients) to get help for SQL statements.

For a full list of changes, please refer to the changelog sections for each individual 4.1.x release.

D.2.1 Changes in release 4.1.10 (not released yet)

Functionality added or changed:

Bugs fixed:

  • Fixed a bug in max_heap_table_size handling, that resulted in Table is full error when the table was still smaller than the limit. (Bug #7791).
  • Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. ( CAN-2005-0004)

D.2.2 Changes in release 4.1.9 (13 Jan 2005)

Functionality added or changed:

  • The naming scheme of the Windows installation packages has changed slightly:
    • The platform suffix was changed from -win to -win32
    • The product descriptions -noinstall and -essential have been moved in front of the version number
    Examples: `mysql-essential-4.1.9-win32.msi', `mysql-noinstall-4.1.9-win32.zip' See section 2.3 Installing MySQL on Windows.
  • The Mac OS X 10.3 installation disk images now include a MySQL Preference Pane for the Mac OS X Control Panel that enables the user to start and stop the MySQL server via the GUI and activate and deactivate the automatic MySQL server startup on bootup.
  • Seconds_Behind_Master will be NULL (which means ``unknown'') if the slave SQL thread is not running, or if the slave I/O thread is not running or not connected to master. It will be zero if the SQL thread has caught up with the I/O thread. It no longer grows indefinitely if the master is idle.
  • InnoDB: Do not acquire an internal InnoDB table lock in LOCK TABLES if AUTOCOMMIT=1. This helps in porting old MyISAM applications to InnoDB. InnoDB table locks in that case caused deadlocks very easily.
  • InnoDB: Print a more descriptive error and refuse to start InnoDB if the size of `ibdata' files is smaller than what is stored in the tablespace header; innodb_force_recovery overrides this.
  • The MySQL server aborts immediately instead of simply issuing a warning if it is started with the --log-bin option but cannot initialize the binary log at startup (that is, an error occurs when writing to the binary log file or binary log index file).
  • The binary log file and binary log index file now behave like MyISAM when there is a "disk full" or "quota exceeded" error. See section A.4.3 How MySQL Handles a Full Disk.

Bugs fixed:

  • InnoDB: Fixed the critical bug if you enabled innodb_file_per_table in `my.cnf'. If you shut down mysqld, records could disappear from the secondary indexes of a table. (Bug #7496)
  • InnoDB: Fixed a bug: 32-bit mysqld binaries built on HP-UX-11 did not work with InnoDB files greater than 2 GB in size. (Bug #6189)
  • InnoDB: Return a sensible error code from DISCARD TABLESPACE if it fails because the table is referenced by a FOREIGN KEY.
  • InnoDB: Fixed a bug: InnoDB failed to drop a table in the background drop queue if the table was referenced by a FOREIGN KEY constraint.
  • InnoDB: Fixed a bug: if we dropped a table where an INSERT was waiting for a lock to check a FOREIGN KEY constraint, then an assertion would fail in lock_reset_all_on_table().
  • InnoDB: Fix a little bug: we looked at the physical size of a stored SQL NULL value from a wrong field in the index; this has probably caused no bugs visible to the user. It caused only some extra space to be used in some rare cases.
  • InnoDB: Use the fcntl() file flush method on Mac OS X versions 10.3 and up. Apple had disabled fsync() in Mac OS X for internal disk drives, which caused corruption at power outages.
  • mysqladmin password now checks whether the server has --old-passwords turned on or predates 4.1 and uses the old-format password if so. (Bug #7451)
  • Added a --default-character-set option to mysqladmin to avoid problems when the default character set is not latin1. (Bug #7524)
  • Fix a problem with truncation of FLOAT values. (Bug #7361)
  • Fixed a bug in PROCEDURE ANALYSE(), which did not quote some ENUM values properly. (Bug #2813)
  • Fixed a bug that caused incorrect results for complex datetime expressions containing casts of datetime values to TIME or DATE values. (Bug #6914)
  • Include compression library flags in the output from mysql_config --lib_r. (Bug #7021)
  • Corrected a problem with mysql_config not producing all relevant flags from CFLAGS. (Bug #6964)
  • Corrected a problem with mysqld_safe not properly capturing output from ps. (Bug #5878)
  • Fixed a bug that caused a linking failure when linking both the MySQL client library and IMAP library. (Bug #7428)
  • Fixed a bug that caused microseconds to be gobbled from the string result of the STR_TO_DATE function, if there is some other specifier in the format string following %f. (Bugs #7458)
  • Made the MySQL server accept executing SHOW CREATE DATABASE even if the connection has an open transaction or locked tables. Refusing it made mysqldump --single-transaction sometimes fail to print a complete CREATE DATABASE statement for some dumped databases. (Bug #7358)
  • Fixed that, when encountering a ``disk full'' or ``quota exceeded'' write error, MyISAM sometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714)
  • Fixed that --expire-log-days was not honored if using only transactions. (Bug #7236)
  • Fixed that a slave could crash after replicating many ANALYZE TABLE, OPTIMIZE TABLE, or REPAIR TABLE statements from the master. (Bug #6461, Bug #7658)

D.2.3 Changes in release 4.1.8 (14 Dec 2004)

Note: Due to a libtool-related bug in the source distribution, the creation of shared libmysqlclient libraries was not possible (the resulting files were missing the .so file name extension). The file `ltmain.sh' was updated to fix this problem and the resulting source distribution was released as `mysql-4.1.8a.tar.gz'. This modification did not affect the binary packages. (Bug #7401)

Functionality added or changed:

  • For ALTER DATABASE, the database name now can be omitted to apply the change to the default database.
  • Added WITH CONSISTENT SNAPSHOT clause to START TRANSACTION to begin a transaction with a consistent read.
  • Added --order-by-primary to mysqldump, to sort each table's data in a dump file. This may be useful when dumping a MyISAM table which will be loaded into an InnoDB table. Dumping a MyISAM table with this option is considerably slower than without.
  • InnoDB: Do not periodically write SHOW INNODB STATUS information to a temporary file unless the configuration option innodb_status_file=1 is set.
  • InnoDB: Commit after every 10,000 copied rows when executing ALTER TABLE. This makes it much faster to recover from an aborted ALTER TABLE or OPTIMIZE TABLE.
  • FULLTEXT index block size is changed to be 1024 instead of 2048.
  • Added --disable-log-bin option to mysqlbinlog. Using this option you can disable binary logging for the statements produced by mysqlbinlog. That is, mysqlbinlog --disable-log-bin <file_name> | mysql won't write any statements to the MySQL server binary log.
  • The --master-data option for mysqldump now takes an optional argument of 1 or 2 to produce a non-commented or commented CHANGE MASTER TO statement. The default is 1 for backward compatibility.
  • mysqldump --single-transaction --master-data now is able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates. This makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See section 8.8 The mysqldump Database Backup Program.
  • Added --lock-all-tables to mysqldump to lock all tables by acquiring a global read lock.
  • Added --hex-blob option to mysqldump for dumping binary string columns using hexadecimal notation.
  • Added mysql_hex_string() C API function that hex-encodes a string.
  • In the normal log MySQL now prints the logposition for Binlog Dump requests.
  • Added [mysql_cluster] section to `my.cnf' file for configuration settings specific to MySQL Cluster. ndb-connectstring variable moved here.
  • A connection doing a rollback will now display "Rolling back" in the State column of SHOW PROCESSLIST.
  • mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, etc) before each LOAD DATA INFILE, like it already does for other queries; unless --short-form is used.

Bugs fixed:

  • Fixed incorrect referencing to column by name from subquery to outer query in case of using temporary table by outer query and placing subquery in the WHERE clause. (Bug #7079)
  • Fixed a bug in authentication code that allowed a malicious user to crash the server with specially crafted packets (using a modified client library). (Bug #7187)
  • Fixed a crashing bug in a string function LEFT, when this function is part of the expression which is used as GROUP BY field. (Bug #7101)
  • Fixed bug which caused MySQL to require privileges on system time zone description tables for implicit access to them (i.e. if one set time_zone variable or used CONVERT_TZ() function) in case when some table-level or column-level privileges existed. (Bug #6765)
  • mysql_stmt_data_seek(stmt,0) will now rewind a counter and enable that buffered rows can be re-fetched on the client side. (Bug #6996)
  • Fixed an insufficient privilege check in SHOW CREATE TABLE command. (Bug #7043)
  • Fixed a rare memory corruption (that resulted in a crash) in MATCH ... AGAINST on columns that use multi-byte character sets. (Bug #6269)
  • Fixed NULL processing in ALL/SOME subqueries. (Bug #6247)
  • Fixed execution complex queries with subqueries. (Bug #6406, Bug #6841)
  • Fixed initialization of some internal structures for first execution. (Bug #6517)
  • Backported a fix for the fulltext interface from MySQL 5.0. (Bug #6523)
  • Fixed NULL value handling in case of empty results in subqueries. (Bug #6806)
  • Prevent adding CREATE TABLE .. SELECT query to the binary log when the insertion of new records partially failed. (Bug #6682)
  • INSERT ... SELECT no longer reports spurious "column truncated" warnings (Bug #6284)
  • Fixed a bug that could cause "Record has changed since last read in table" error message in some queires on HEAP tables that contain only one row. (Bug #6748)
  • mysqld_safe was in many cases ignoring any --no-defaults, --defaults-file, or --defaults-extra-file arguments. Those arguments are now honored, and this may change what options are passed to mysqld in some installations.
  • The server was interpreting CHAR BINARY and VARCHAR BINARY columns from 4.0 tables as having the BINARY and VARBINARY data types. Now they are interpreted as CHAR and VARCHAR columns that have the binary collation of the column's character set. (This is the same way that CHAR BINARY and VARCHAR BINARY are handled for new tables created in 4.1.)
  • Fixed spurious "duplicate key" error from REPLACE or INSERT ... ON DUPLICATE KEY UPDATE statements performing multiple-row insert in the table that had unique and fulltext indexes. (Bug #6784)
  • Fixed a bug in execution of subqueries in SET and DO statements which caused wrong results to be returned from subsequent queries. (Bug #6462)
  • Fixed a bug which allowed server to accept datetime values with wrong year part. Also now server will perform same checks for datetime values passed through MYSQL_TIME structure as for datetime values passed as strings. (Bug #6266)
  • Fixed a bug with INSERT for a table with FULLTEXT indexes. Under rare circumstances, this could result in a corrupted table if words of different lengths may be considered equal. This is possible in some collations, for example, in utf8_general_ci or latin1_german2_ci. (Bug #6265)
  • InnoDB: Do not intentionally crash `mysqld' if the buffer pool is exhausted by the lock table; return error 1206 instead. Do not intentionally crash `mysqld' if we cannot allocate the memory for the InnoDB buffer pool. (Bug #6817) (Bug #6827)
  • InnoDB: Let InnoDB's FOREIGN KEY parser to remove the latin1 character 0xA0 from the end of an unquoted identifier. The EMS MySQL Manager in ALTER TABLE adds that character after a table name, which caused error 121 when we tried to add a new constraint.
  • InnoDB: Refuse to open new-style tables created with MySQL 5.0.3 or later. (Bug #7089)
  • InnoDB: Do not call rewind() when displaying SHOW INNODB STATUS information on stderr.
  • InnoDB: Made the foreign key parser better aware of quotes. (Bug #6340)
  • InnoDB: If one used INSERT IGNORE to insert several rows at a time, and the first inserts were ignored because of a duplicate key collision, then InnoDB in a replication slave assigned AUTO_INCREMENT values 1 bigger than in the master. This broke the MySQL replication. (Bug #6287)
  • InnoDB: Fixed a bug: InnoDB ignored in innodb_data_file_path the max specification in :autoextend:max:2000M. This bug was introduced in 4.1.1.
  • InnoDB: Fixed a bug: innodb_locks_unsafe_for_binlog still uses next-key locking (Bug #6747). InnoDB used next-key locking when record matched completely to search tuple. This unnecessary next-key locking is now removed when innodb_locks_unsafe_for_binlog option is used.
  • InnoDB: Fix two hangs: FOREIGN KEY constraints treated table and database names as case-insensitive. RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. Fix also a hang over the dictionary mutex that would occur if one tried in ALTER TABLE or RENAME TABLE to create a foreign key constraint name that collided with another existing name. (Bug #3478)
  • If STMT_ATTR_UPDATE_MAX_LENGTH is set for a prepared statement, mysql_stmt_store_result() will update field->max_length for numeric columns as well. (Bug#6096)
  • Prepared statements now handle ZEROFILL when converting integer to string.
  • Fixed crash when a call to mysql_stmt_store_result() occurred without a preceding call to mysql_stmt_bind_result().
  • Fixed crash in prepared statements when using SELECT * FROM t1 NATURAL JOIN t2....
  • Fixed crash in prepared statements when using SELECT ... PROCEDURE.
  • Fixed crash in prepared statements when using subqueries.
  • GROUP_CONCAT(...ORDER BY) when used with prepared statements gave wrong sorting order.
  • CREATE TABLE created_table didn't signal when table was created. This could cause a DROP TABLE created_table in another thread to wait "forever".
  • Server warnings now are reset when you execute a prepared statement.
  • Improved performance of identifier comparisons (if many tables or columns are specified).
  • OPTIMIZE TABLE, REPAIR TABLE, and ANALYZE TABLE are now replicated without any error code in the binary log. (Bug #5551)
  • LOAD DATA INFILE now works with option replicate-rewrite-db. (Bug #6353)
  • Fixed a bug which caused a crash when only the slave I/O thread was stopped and started. (Bug #6148)
  • Changed semantics of CREATE/ALTER/DROP DATABASE statements so that replication of CREATE DATABASE is possible when using --binlog-do-db and --binlog-ignore-db. (Bug #6391)
  • If a connection had an open transaction but had done no updates to transactional tables (for example if had just done a SELECT FOR UPDATE then executed a non-transactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714)
  • If a connection was interrupted by a network error and did a rollback, the network error code got stored into the BEGIN and ROLLBACK binary log events; that caused superfluous slave stops. (Bug #6522)
  • A sequence of BEGIN (or SET AUTOCOMMIT=0), FLUSH TABLES WITH READ LOCK, transactional update, COMMIT, FLUSH TABLES WITH READ LOCK could hang the connection forever and possibly the MySQL server itself. This happened for example when running the innobackup script several times. (Bug #6732)
  • mysqlbinlog did not print SET PSEUDO_THREAD_ID statements in front of LOAD DATA INFILE statements inserting into temporary tables, thus causing potential problems when rolling forward these statements after restoring a backup. (Bug #6671)

D.2.4 Changes in release 4.1.7 (23 Oct 2004: Production)

Functionality added or changed:

  • MOD() no longer rounds arguments with a fractional part to integers. Now it returns exact remainder after division. (Bug #6138)
  • InnoDB: Added a startup option and settable system variable innodb_table_locks for making LOCK TABLE acquire also InnoDB locks. The default value is 1, which means that LOCK TABLES causes also InnoDB internally to take a table lock. In applications using AUTOCOMMIT=1 and LOCK TABLES, InnoDB's internal table locks that were added in 4.0.20 and 4.1.2 can cause deadlocks. You can set innodb_table_locks=0 in `my.cnf' to remove that problem. (Bug #3299, Bug #5998)
  • See section 15.17 Restrictions on InnoDB Tables. (Bug #3299, Bug #5998) InnoDB: SHOW TABLE STATUS now shows the creation time of the table for InnoDB. Note that this timestamp might not be the correct time because, e.g., ALTER TABLE changes this timestamp.
  • InnoDB: If innodb_thread_concurrency would be exceeded, let a thread sleep 10 ms before entering the FIFO queue; previously, the value was 50 ms.

Bugs fixed:

  • Fixed a bug with FOUND_ROWS() used together with LIMIT clause in prepared statements. (Bug#6088)
  • Fixed a bug with NATURAL JOIN in prepared statements. (Bug#6046).
  • Fixed a bug in join of tables from different databases having columns with identical names (prepared statements). (Bug#6050)
  • Now implicit access to system time zone description tables (which happens when you set time_zone variable or use CONVERT_TZ() function) does not require any privileges. (Bug #6116)
  • Fixed a bug which caused the server to crash when the deprecated libmysqlclient function mysql_create_db() was called. (Bug #6081)
  • Fixed REVOKE ALL PRIVILEGES, GRANT OPTION FROM user so that all privileges are revoked correctly. (Bug #5831). This corrects a case that the fix in 4.1.6 could miss.
  • Fixed crash when selecting from a HEAP table with key_column IS NOT NULL. This could also cause a crash if not all index parts where used. (Bug #6082)
  • Fixed a bug that could cause MyISAM index corruption when key values start with character codes below BLANK. This was caused by the new key sort order in 4.1. (Bug #6151)
  • InnoDB: Fixed a bug in LOAD DATA INFILE…REPLACE printing duplicate key error when executing the same load query several times. (Bug #5835)
  • Fixed a bug in the prepared statements protocol when wrong metadata was sent for SELECT statements not returning a result set (such as SELECT ... INTO OUTFILE). (Bug #6059)
  • Fixed bug which allowed one to circumvent missing UPDATE privilege if one had INSERT and SELECT privileges for table with primary key. (Bug #6173)
  • Fixed a bug in libmysqlclient with wrong conversion of negative time values to strings. (Bug #6049).
  • Fixed a bug in libmysqlclient with wrong conversion of zero date values (0000-00-00) to strings. (Bug #6058)
  • Fixed a bug that caused the server to crash on attempt to prepare a statement with RAND(?). (Bug #5985)
  • Fixed a bug with handling of DATE, TIME, and DATETIME columns in the binary protocol. The problem is compiler-specific and could have been observed on HP-UX, AIX, Solaris9, when compiling with native compiler. (Bug #6025)
  • Fixed a bug with handling of TINYINT columns in the binary protocol. The problem is specific to platforms where the C compiler has the char data type unsigned by default. (Bug #6024)
  • InnoDB: Fixed problem introduced in MySQL 4.0.21 where a connection starting a transaction, doing updates, then FLUSH TABLES WITH READ LOCK, then COMMIT, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDB innobackup script. (Bug #5949)
  • InnoDB: Release the dictionary latch during a long cascaded FOREIGN KEY operation, so that we do not starve other users doing CREATE TABLE or other DDL operation. This caused a notorious 'Long semaphore wait' message to be printed to the `.err' log. (Bug #5961)

D.2.5 Changes in release 4.1.6 (10 Oct 2004)

Functionality added or changed:

  • Added option --sigint-ignore to the mysql command line client to make it ignore SIGINT signals (typically the result of the user pressing Control-C).
  • InnoDB: Added the startup option and settable global variable innodb_max_purge_lag for delaying INSERT, UPDATE and DELETE operations when the purge operations are lagging. The default value of this parameter is zero, meaning that there will not be any delays. See section 15.13 Implementation of Multi-Versioning.
  • InnoDB: The innodb_autoextend_increment startup option that was introduced in release 4.1.5 was made a settable global variable. (Bug #5736)
  • InnoDB: If DROP TABLE is invoked on an InnoDB table for which the .ibd file is missing, print to error log that the table was removed from the InnoDB data dictionary, and allow MySQL to delete the .frm file. Maybe DROP TABLE should issue a warning in this case.
  • TIMESTAMP columns now can store NULL values. To create such a column, you must explicitly specify the NULL attribute in the column specification. (Unlike all other column types, TIMESTAMP columns are NOT NULL by default.)
  • Now if ALTER TABLE converts one AUTO_INCREMENT column to another AUTO_INCREMENT column it will preserve zero values (this includes the case that we don't change such column at all).
  • Now if ALTER TABLE converts some column to TIMESTAMP NOT NULL column it will convert NULL values to current timestamp value (One can still get old behavior by setting system TIMESTAMP variable to zero).
  • On Windows, the MySQL configuration files included in the package now use `.ini' instead of `.cnf' as the file name suffix.

Bugs fixed:

  • Fixed a bug that caused the server to crash on attempt to execute a prepared statement with a subselect inside a boolean expression. (Bug #5987)
  • Fixed a bug that caused the server to sometimes choose non-optimal execution plan for a prepared statement executed with changed placeholder values. (Bug #6042)
  • 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)
  • InnoDB: Fixed a bug in the InnoDB FOREIGN KEY parser that prevented ALTER TABLE of tables containing `#' in their names. (Bug #5856)
  • InnoDB: Fixed a bug that prevented ALTER TABLE t DISCARD TABLESPACE from working. (Bug #5851)
  • InnoDB: SHOW CREATE TABLE now obeys the SET SQL_MODE=ANSI and SET SQL_QUOTE_SHOW_CREATE=0 settings. (Bug #5292)
  • InnoDB: Fixed a bug that caused CREATE TEMPORARY TABLE ... ENGINE=InnoDB to terminate mysqld when running in innodb_file_per_table mode. Per-table tablespaces for temporary tables will from now on be created in the temporary directory of mysqld. (Bug #5137)
  • InnoDB: Fixed some (not all) UTF-8 bugs in column prefix indexes. (Bug #5975)
  • InnoDB: If one updated a column so that its size changed, or updated it to an externally stored (TEXT or BLOB) value, then ANOTHER externally stored column would show up as 512 bytes of good data + 20 bytes of garbage in a consistent read that fetched the old version of the row. (Bug #5960)
  • InnoDB: Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table referenced by a FOREIGN KEY constraint; this error number is less misleading than the previous number HA_ERR_CANNOT_ADD_FOREIGN, but misleading still.
  • Fixed REVOKE ALL PRIVILEGES, GRANT OPTION FROM user so that all privileges are revoked correctly. (Bug #5831)
  • Fixed a bug that caused the server to crash when character set conversion was implicitly used in prepared mode; for example, as in 'abc' LIKE CONVERT('abc' as utf8). (Bug #5688)
  • The mysql_change_user() C API function now frees all prepared statements associated with the connection. (Bug #5315)
  • Fixed a bug when inserting NULL into an AUTO_INCREMENT column failed, when using prepared statements. (Bug #5510)
  • Fixed slave SQL thread so that the SET COLLATION_SERVER... statements it replicates don't advance its position (so that if it gets interrupted before the actual update query, it will later redo the SET). (Bug #5705)
  • Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug #5711)
  • Fixed that if a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it prints a message to the error log every 10 minutes, and waits until disk space becomes available. (Bug #3248)
  • Now MySQL will not prefer columns, which are mentioned in select list but are renamed, over columns from other tables participating in FROM clause when it resolves GROUP BY clause (e.g. SELECT t1.a AS c FROM t1, t2 ORDER BY a will produce an error if both t1 and t2 tables contain a column). (Bug #4302)
  • Behavior of ALTER TABLE converting column containing NULL values to AUTO_INCREMENT column is no longer affected by NO_AUTO_VALUE_ON_ZERO mode. (Bug #5915).

D.2.6 Changes in release 4.1.5 (16 Sep 2004)

Functionality added or changed:

  • InnoDB: Added configuration option innodb_autoextend_increment for setting the size in megabytes by which InnoDB tablespaces are extended when they become full. The default value is 8, corresponding to the fixed increment of 8MB in previous versions of MySQL.
  • InnoDB: The new Windows installation wizard of MySQL makes InnoDB as the MySQL default table type on Windows, unless explicitly specified otherwise. Note that it places the `my.ini' file in the installation directory of the MySQL server.

Bugs fixed:

  • Fixed a bug which caused the server to crash on attempt to execute a prepared statement with BETWEEN ? AND ? and a datetime column. (Bug #5748)
  • Fixed name resolving of external fields of subqueries if subquery placed in select list of query with grouping. (Bug #5326)
  • Fixed detection of using same table for updating and selecting in multi-update queries. (Bug #5455)
  • The values of the max_sort_length, sql_mode, and group_concat_max_len system variables now are stored in the query cache with other query information to avoid returning an incorrect result from the query cache. (Bug #5394) (Bug #5515)
  • Fixed syntax analyzer with sql_mode=IGNORE_SPACE. It happened to take phrases like default .07 as identifier.identifier. (Bug #5318)
  • Fixed illegal internal field length of user variables of integer type. This showed up when creating a table as SELECT @var_name. (Bug #4788)
  • Fixed a buffer overflow in prepared statements API (libmysqlclient) when a statement containing thousands of placeholders was executed. (Bug #5194)
  • Fixed a bug in the server when after reaching a certain limit of prepared statements per connection (97), statement ids began to overlap, so occasionally wrong statements were chosen for execution. (Bug #5399)
  • Fixed a bug in prepared statements when LIKE used with arguments in different character sets crashed server on first execute. (Bug #4368)
  • Fixed a bug in prepared statements when providing '0000-00-00' date to a parameter lead to server crash. (Bug #4231, Bug #4562)
  • Fixed a bug in OPTIMIZE TABLE that could cause table corruption on FULLTEXT indexes. (Bug #5327)
  • InnoDB: Fixed a bug that InnoDB only allowed a maximum of 1000 connections inside InnoDB at the same time. A higher number could cause an assertion failure in sync0arr.c, line 384. Now we allow 1000, 10000, or 50000, depending on the buffer pool size. (Bug #5414)

D.2.7 Changes in release 4.1.4 (26 Aug 2004: Gamma)

Note: To fix a compile problem on systems that do not have automake 1.7 installed, an updated 4.1.4a source tarball has been published. In addition to resolving this automake dependency (Bug #5319), it also fixes some reported libedit compile errors when using a non-gcc compiler (Bug #5353).

Functionality added or changed:

  • Added the CSV storage engine.
  • Made internal representation of TIMESTAMP values in InnoDB in 4.1 to be the same as in 4.0. This difference resulted in incorrect datetime values in TIMESTAMP columns in InnoDB tables after an upgrade from 4.0 to 4.1. (Bug #4492) Warning: extra steps during upgrade required! Unfortunately this means that if you are upgrading from 4.1.x, where x <= 3, to 4.1.4 you should use mysqldump for saving and then restoring your InnoDB tables with TIMESTAMP columns.
  • The mysqld-opt Windows server was renamed to mysqld. This completes the Windows server renaming begun in MySQL 4.1.2. See section 2.3.9 Selecting a MySQL Server type.
  • Added Latin language collations for the ucs2 and utf8 Unicode character sets. These are called ucs2_roman_ci and utf8_roman_ci.
  • Corrected the name of the Mac OS X StartupItem script (it must match the name of the subdirectory, which was renamed to MySQLCOM in MySQL 4.1.2). Thanks to Bryan McCormack for reporting this.
  • Added --start-datetime, --stop-datetime, --start-position, and --stop-position options to mysqlbinlog. These make point-in-time recovery easier.
  • Killing a CHECK TABLE statement does not result in the table being marked as ``corrupted'' any more; the table remains as if CHECK TABLE had not even started. See section 13.5.5.3 KILL Syntax.
  • Made the MySQL server ignore 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).
  • Support of usage of column aliases qualified by table name or alias in ORDER BY and GROUP BY was dropped. For example the following query SELECT a AS b FROM t1 ORDER BY t1.b is not allowed. One should use SELECT a AS b FROM t1 ORDER BY t1.a or SELECT a AS b FROM t1 ORDER BY b instead. This was non-standard (since aliases are defined on query level not on table level) and caused problems with some queries.

Bugs fixed:

  • Fixed a bug that caused libmysql to crash when attempting to fetch a value of MEDIUMINT column. (Bug #5126)
  • Fixed a bug that caused the MySQL server to crash when attempting to execute a prepared statement with SELECT ... INTO @var for a second time. (Bug #5034)
  • Fixed execution of optimized IN subqueries that use compound indexes. (Bug #4435)
  • Prohibited resolving of table fields in inner queries if fields do not take part in grouping for queries with grouping (inside aggregate function arguments, all table fields are still allowed). (Bug #4814)
  • Fixed a crash after SLAVE STOP if the IO thread was in a special state. (Bug #4629)
  • Fixed an old bug in concurrent accesses to MERGE tables (even one MERGE table and MyISAM tables), that could have resulted in a crash or hang of the server. (Bug #2408)
  • Fixed a bug that caused server crash on attempt to execute for a second time a prepared statement with NOT in WHERE or ON clauses. (Bug #4912)
  • MATCH ... AGAINST now works in a subquery. (Bug #4769)
  • Fixed a bug that omitted the `.err' extension of the error log file (--log-error) when the hostname contained a domain name. The domain name is now replaced by the extension. (Bug #4997)
  • Fixed a crash in myisamchk. (Bug #4901)
  • Fixed a bug which caused server crash if one used the CONVERT_TZ() function with time zone described in database as parameter and this time zone was not used before. (Bug #4508)
  • Support for %T, %r, %V, %v and %X, %x format specifiers was added to STR_TO_DATE() function. (Bug #4756)
  • Fixed a bug (hang) in NATURAL JOIN where joined table had no common column. (Bug #4807)
  • Fixed a crash caused by UNHEX(NULL). (Bug #4441)
  • mysql_fix_privilege_tables didn't correctly handle the argument of its --password=# option. (Bug #4240, Bug #4543)
  • Fixed that mysqlbinlog --read-from-remote-server sometimes couldn't accept 2 binary logs on command line. (Bug #4507)
  • 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 an assertion failure when reading the grant tables (Bug #4407)
  • Fixed that CREATE TABLE ... TYPE=HEAP ... AS SELECT... caused replication slave to stop. (Bug #4971)
  • Fixed that mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...) failed to disable LOAD DATA LOCAL INFILE. (Bug #5038)
  • Fixed that disable-local-infile option had no effect if client read it from a configuration file using mysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073)
  • Fixed that SET GLOBAL SYNC_BINLOG did not work on some platforms (Mac OS X). (Bug #5064)
  • Fixed that mysql-test-run failed on the rpl_trunc_binlog test if running test from the installed (the target of 'make install') directory. (Bug #5050)
  • Fixed that mysql-test-run failed on the grant_cache test when run as Unix user 'root'. (Bug #4678)
  • Fixed an unlikely deadlock which could happen when using KILL. (Bug #4810)
  • Fixed a crash when one connection got KILLed while it was doing START SLAVE. (Bug #4827)
  • Made FLUSH TABLES WITH READ LOCK block COMMIT if server is running with binary logging; this ensures that the binary log position 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 if the table was a temporary table. (Bug #5033)
  • Fixed bug which caused error to be reported when column from ORDER BY clause was present in two tables participating in SELECT even if the second instance of column in select list was renamed. (Bug #4302)

D.2.8 Changes in release 4.1.3 (28 Jun 2004: Beta)

Note: The initial release of MySQL 4.1.3 for Windows accidentally was not compiled with support for the Spatial Extensions (OpenGIS). This was fixed by rebuilding from the same 4.1 code snapshot with the missing option and releasing those packages as version 4.1.3a.

To enable compiling the newly released PHP 5 against MySQL 4.1.3 on Windows, the Windows packages had to be rebuilt once more to add a few missing symbols to the MySQL client library. These packages were released as MySQL 4.1.3b.

Functionality added or changed:

  • Added the ARCHIVE storage engine.
  • Added SQL syntax for prepared statements. See section 13.7 SQL Syntax for Prepared Statements.
  • Language-specific collations were added for the ucs2 and utf8 Unicode character sets: Icelandic, Latvian, Romanian, Slovenian, Polish, Estonian, Swedish, Turkish, Czech, Danish, Lithuanian, Slovak, Spanish, Traditional Spanish.
  • Support for per-connection time zones was added. Now you can set the current time zone for a connection by setting the @@time_zone system variable to a value such as '+10:00' or 'Europe/Moscow' (where 'Europe/Moscow' is the name of one of the time zones described in the system tables). Functions like CURRENT_TIMESTAMP, UNIX_TIMESTAMP, and so forth honor this time zone. Values of TIMESTAMP type are also interpreted as values in this time zone. So now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE. That is, values stored in such a column are normalized towards UTC and converted back to the current connection time zone when they are retrieved from such a column. To set up the tables that store time zone information, see section 2.9 Post-Installation Setup and Testing.
  • Warning: Incompatible change! The timezone system variable has been removed and replaced by system_time_zone. See section 5.2.3 Server System Variables.
  • Basic time zone conversion function CONVERT_TZ() was added. It assumes that its first argument is a datetime value in the time zone specified by its second argument and returns the equivalent datetime value in the time zone specified by its third argument.
  • CHECK TABLE now can be killed. It will then mark the table as corrupted. See section 13.5.5.3 KILL Syntax.
  • Warning: Incompatible change! C API change: mysql_shutdown() now requires a second argument. This is a source-level incompatibility that affects how you compile client programs; it does not affect the ability of compiled clients to communicate with older servers. See section 21.2.3.52 mysql_shutdown().
  • OPTIMIZE TABLE for InnoDB tables is now mapped to ALTER TABLE instead of ANALYZE TABLE.
  • sync_frm is now a settable global variable (not only a startup option).
  • Added the sync_binlog=N global variable and startup option, which makes the MySQL server synchronize its binary log to disk (fdatasync()) after every Nth write to the binary log.
  • Changed the slave SQL thread to print fewer useless error messages (no more message duplication; no more messages when an error is skipped (because of slave-skip-errors).
  • DROP DATABASE IF EXISTS, DROP TABLE IF EXISTS, single-table DELETE and single-table UPDATE are now written to the binary log even if they changed nothing on the master (for example, even if the DELETE matched no row). The old behavior sometimes caused bad surprises in replication setups.
  • Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See section 6.7 Replication Features and Known Problems.
  • Added --innodb-safe-binlog server option, which adds consistency guarantees between the content of InnoDB tables and the binary log. See section 5.9.4 The Binary Log.
  • LIKE now supports the use of a prepared statement parameter or delimited constant expression as the argument to ESCAPE (Bug #4200).

Bugs fixed:

  • Fixed CREATE DATABASE IF NOT EXISTS for Win32 which caused an error if database existed. (Bug #4378)
  • Added missing root account to Windows version of mysqld. (Bug #4242)
  • Fixed bug in prepared EXPLAIN statement which led to server crash. (Bug #4271)
  • Fixed a bug of using parameters in some prepared statements via SQL syntax. (Bug #4280)
  • Fixed a bug in MERGE tables created with INSERT_METHOD=LAST, that were not able to report a key number that caused ``Duplicate entry'' error for UNIQUE key in INSERT. As a result, error message was not precise enough (error 1022 instead of error 1062) and INSERT ... ON DUPLICATE KEY UPDATE did not work. (Bug #4008)
  • Fixed a bug in DELETE from a table with FULLTEXT indexes which under rare circumstances could result in a corrupted table, if words of different lengths may be considered equal (which is possible in some collations, for example, in utf8_general_ci or latin1_german2_ci.) (Bug #3808)
  • Fixed too-early unlocking of tables if we have subquery in HAVING clause. (Bug #3984)
  • Fixed a bug in mysqldump when it didn't return an error if the output device was filled (Bug #1851)
  • Fixed a bug in client-side conversion of string column to MYSQL_TIME application buffer (prepared statements API). (Bug #4030)
  • Fixed a bug with server crash on attempt to execute a non-prepared statement. (Bug #4236)
  • Fixed a bug with server crash on attempt to prepare a statement with character set introducer. (Bug #4105)
  • Fixed bug which caused different number of warnings to be generated when bad datetime as string or as number was inserted into DATETIME or TIMESTAMP column. (Bug #2336)
  • Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)
  • Fixed unlikely bug in the range optimizer when using many IN() queries on different key parts. (Bug #4157)
  • Fixed problem with NULL and derived tables. (Bug #4097)
  • Fixed wrong UNION results if display length of fields for numeric types was set less then real length of values in them. (Bug #4067)
  • Fixed a bug in mysql_stmt_close(), which hung up when attempting to close statement after failed mysql_stmt_fetch(). (Bug #4079)
  • Fixed bug of re-execution optimized COUNT(*), MAX() and MIN() functions in prepared statements. (Bug #2687)
  • Fixed a bug with COUNT(DISTINCT) performance degradation in cases like COUNT(DISTINCT a TEXT, b CHAR(1)) (no index used). (Bug #3904)
  • Fixed a bug in MATCH ... AGAINST(... IN BOOLEAN MODE) that under rare circumstances could cause wrong results if in the data's collation one byte could match many (like in utf8_general_ci or latin1_german2_ci.) (Bug #3964)
  • Fixed a bug in prepared statements protocol, when microseconds part of MYSQL_TYPE_TIME/MYSQL_TYPE_DATETIME columns was not sent to the client. (Bug #4026)
  • Fixed a bug that using --with-charset with configure didn't affect the MySQL client library. (Bug #3990)
  • Fixed a bug in authentication code that allowed a malicious user to bypass password verification with specially crafted packets (using a modified client library).
  • Fixed bug with wrong result of CONCAT(?, col_name) in prepared statements. (Bug #3796)
  • 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=file_name, where the file was located somewhere outside of the data directory, it created binary log files owned by root in this directory that remained owned by root after the installation. This is now fixed by starting mysqld as the mysql system user instead. (Bug #4038)
  • Made DROP DATABASE honor the value of lower_case_table_names. (Bug #4066)
  • The slave SQL thread refused to replicate INSERT ... SELECT if it examined more than 4 billion rows. (Bug #3871)
  • mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug #3875)
  • Fixed incorrect destruction of expression 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)

D.2.9 Changes in release 4.1.2 (28 May 2004)

Functionality added or changed:

  • Added the EXAMPLE storage engine.
  • The mysqld Windows server was renamed to mysqld-debug. See section 2.3.9 Selecting a MySQL Server type.
  • Added Handler_discover status variable.
  • Added support for character set conversion and MYSQL_TYPE_BLOB type code in prepared statement protocol.
  • Added explanation of hidden SELECT of UNION in output of EXPLAIN SELECT statement.
  • mysql command-line client now supports multiple -e options. (Bug #591)
  • New myisam_data_pointer_size system variable. See section 5.2.3 Server System Variables.
  • The --log-warnings server option now is enabled by default. Disable with --skip-log-warnings.
  • The --defaults-file=file_name option now requires that the filename must exist (safety fix). (Bug #3413)
  • mysqld_multi now creates the log in the directory named by datadir (from the [mysqld] section in `my.cnf' or compiled in), not in `/tmp' (vulnerability ID CAN-2004-0388). Thanks to Christian Hammers from Debian Security Team for reporting this.
  • Warning: Incompatible change! String comparison now works according to the SQL standard. Because we have that 'a' = 'a ' then from it must follow that 'a' > 'a\t'. (The latter was not the case before MySQL 4.1.2.) To implement it, we had to change how storage engines compare strings internally. As a side effect, if you have a table where a CHAR or VARCHAR column in some row has a value with the last character less than ASCII(32), you will have to repair this table. CHECK TABLES will tell you if this problem exists. (Bug #3152)
  • Added support for DEFAULT CURRENT_TIMESTAMP and for ON UPDATE CURRENT_TIMESTAMP specifications for TIMESTAMP columns. Now you can explicitly say that a TIMESTAMP column should be set automatically to the current timestamp for INSERT and/or UPDATE statements, or even prevent the column from updating automatically. Only one column with such an auto-set feature per table is supported. TIMESTAMP columns created with earlier versions of MySQL behave as before. Behavior of TIMESTAMP columns that were created without explicit specification of default/on as earlier depends on its position in table: If it is the first TIMESTAMP column, it will be treated as having been specified as TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. In other cases, it would be treated as a TIMESTAMP DEFAULT 0 column. NOW is supported as an alias for CURRENT_TIMESTAMP. Warning: Incompatible change! Unlike in previous versions, explicit specification of default values for TIMESTAMP column is never ignored and turns off the auto-set feature (unless you have CURRENT_TIMESTAMP as the default).
  • Warning: Incompatible change! Renamed prepared statements C API functions:
    Old Name New Name
    mysql_bind_param() mysql_stmt_bind_param()
    mysql_bind_result() mysql_stmt_bind_result()
    mysql_prepare() mysql_stmt_prepare()
    mysql_execute() mysql_stmt_execute()
    mysql_fetch() mysql_stmt_fetch()
    mysql_fetch_column() mysql_stmt_fetch_column()
    mysql_param_count() mysql_stmt_param_count()
    mysql_param_result() mysql_stmt_param_metadata()
    mysql_get_metadata() mysql_stmt_result_metadata()
    mysql_send_long_data() mysql_stmt_send_long_data()
    Now all functions that operate with a MYSQL_STMT structure begin with the prefix mysql_stmt_.
  • Warning: Incompatible change! The signature of the mysql_stmt_prepare() function was changed to int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length). To create a MYSQL_STMT handle, you should use the mysql_stmt_init() function, not mysql_stmt_prepare().
  • SHOW GRANTS with no FOR clause or with FOR CURRENT_USER() shows the privileges for the current session.
  • The improved character set support introduced in MySQL 4.1.0 for the MyISAM and HEAP storage engines is now available for InnoDB as well.
  • A name of ``Primary'' no longer can be specified as an index name. (That name is reserved for the PRIMARY KEY if the table has one.) (Bug #856)
  • MySQL now issues a warning when a SET or ENUM column with duplicate values in the list is created. (Bug #1427)
  • Now SQL_SELECT_LIMIT variable has no influence on subqueries. (Bug #2600)
  • UNHEX() function implemented. See section 12.3 String Functions.
  • The mysql command-line client no longer stores in the history file multiple copies of identical queries that are run consecutively.
  • Multi-line statements in the mysql command-line client now are stored in the history file as a single line.
  • UUID() function implemented. Note that it does not work with replication yet. See section 12.8.4 Miscellaneous Functions.
  • Prepared statements with all types of subqueries fixed.
  • MySQL now supports up to 64 indexes per table.
  • MyISAM tables now support keys up to 1000 bytes long.
  • MyISAM and InnoDB tables now support index prefix lengths up to 1000 bytes long.
  • If you try to create a key with a key part that is too long, and it is safe to auto-truncate it to a smaller length, MySQL now does so. A warning is generated, rather than an error.
  • The ft_boolean_syntax variable now can be changed while the server is running. See section 5.2.3 Server System Variables.
  • REVOKE ALL PRIVILEGES, GRANT FROM user_list is changed to a more consistent REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_list. (Bug #2642)
  • Internal string-to-number conversion now supports only SQL:2003 compatible syntax for numbers. In particular, '0x10'+0 will not work anymore. (Actually, it worked only on some systems before, such as Linux. It did not work on others, such as FreeBSD or Solaris. Making these queries OS-independent was the goal of this change.) Use CONV() to convert hexadecimal numbers to decimal. E.g. CONV(MID('0x10',3),16,10)+0.
  • mysqlhotcopy now works on NetWare.
  • ALTER TABLE DROP PRIMARY KEY no longer drops the first UNIQUE index if there is no primary index. (Bug #2361)
  • Added latin1_spanish_ci (Modern Spanish) collation for the latin1 character set.
  • Added the ENGINE table option as a synonym for the TYPE option for CREATE TABLE and ALTER TABLE.
  • Added the --default-storage-engine server option as a synonym for --default-table-type.
  • Added the storage_engine system variable as a synonym for table_type.
  • Warning: Incompatible change! The Type output column for SHOW TABLE STATUS now is labeled Engine.
  • Added init_connect and init_slave system variables. The values should be SQL statements to be executed when each client connects or each time a slave's SQL thread starts, respectively.
  • C API enhancement: SERVER_QUERY_NO_INDEX_USED and SERVER_QUERY_NO_GOOD_INDEX_USED flags are now set in the server_status field of the MYSQL structure. It is these flags that make the query to be logged as slow if mysqld was started with --log-slow-queries --log-queries-not-using-indexes.
  • For replication of MEMORY (HEAP) tables: Made the master automatically write a DELETE FROM statement to its binary log when a MEMORY table is opened for the first time since master's startup. This is for the case where the slave has replicated a non-empty MEMORY table, then the master is shut down and restarted: the table is now empty on master; the DELETE FROM empties it on slave too. Note that even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. But if you use the init-file option to populate the MEMORY table on the master at startup, it ensures that the failing time interval is zero. (Bug #2477)
  • When a session having open temporary tables terminates, the statement automatically written to the binary log is now DROP TEMPORARY TABLE IF EXISTS instead of DROP TEMPORARY TABLE, for more robustness.
  • The MySQL server now returns an error if SET SQL_LOG_BIN or SET SQL_LOG_UPDATE is issued by a user without the SUPER privilege (in previous versions it just silently ignored the statement in this case).
  • Changed that when the MySQL server has binary logging disabled (that is, no --log-bin option was used), then no transaction binary log cache is allocated for connections. This should save binlog_cache_size bytes of memory (32KB by default) for every connection.
  • Added Binlog_cache_use and Binlog_cache_disk_use status variables that count the number of transactions that used transaction binary log and that had to flush this temporary binary log to disk instead of using only the in-memory buffer. They can be used for tuning the binlog_cache_size system variable.
  • Added option --replicate-same-server-id.
  • The Mac OS X Startup Item has been moved from the directory `/Library/StartupItems/MySQL' to `/Library/StartupItems/MySQLCOM' to avoid a file name collision with the MySQL Startup Item installed with Mac OS X Server. See section 2.12.2 Mac OS X Notes.
  • Added option --to-last-log to mysqlbinlog, for use in conjunction with --read-from-remote-server.

Bugs fixed:

  • Fixed check of EXPLAIN of UNION. (Bug #3639)
  • Fixed a bug in a query that used DISTINCT and ORDER BY by column's real name, while the column had an alias, specified in SELECT clause. (Bug #3681)
  • mysqld could crash when a table was altered and used at the same time. This was a 4.1.2-specific bug. (Bug #3643).
  • Fixed bug when using impossible WHERE with PROCEDURE ANALYSE(). (Bug #2238).
  • Fixed security problem in new authentication where password was not checked for changed GRANT accounts until FLUSH PRIVILEGES was executed. (Bug #3404)
  • Fixed crash of GROUP_CONCAT() on expression with ORDER BY and external ORDER BY in a query. (Bug #3752)
  • Fixed a bug in ALL/SOME subqueries in case of optimization (key field present in subquery). (Bug #3646)
  • Fixed a bug in SHOW GRANTS and EXPLAIN SELECT character set conversion. (Bug #3403)
  • Prepare statements parameter do not cause error message as fields used in select list but not included in ORDER BY list.
  • UNION statements did not consult SQL_SELECT_LIMIT value when set. This is now fixed properly, which means that this limit is applied to the top level query, unless LIMIT for entire UNION is used.
  • Fixed a bug in multiple-table UPDATE statements that resulted in an error when one of the tables was not updated but was used in the nested query, contained therein.
  • Fixed mysql_stmt_send_long_data() behavior on second execution of prepared statement and in case when long data had zero length. (Bug #1664)
  • Fixed crash on second execution of prepared statement with UNION. (Bug #3577)
  • Fixed incorrect results of aggregate functions in subquery with empty result set. (Bug #3505)
  • You can now call mysql_stmt_attr_set(..., STMT_ATTR_UPDATE_MAX_LENGTH) to tell the client library to update MYSQL_FIELD->max_length when doing mysql_stmt_store_result(). (Bug #1647).
  • Added support for unsigned integer types to prepared statement API (Bug #3035).
  • Fixed crash in prepared statements when subquery in the FROM clause with parameter used. (Bug #3020)
  • Fixed unknown error when negative value bind to unsigned. (Bug #3223)
  • Fixed aggregate function in prepared statements. (Bug #3360)
  • Incorrect error message when wrong table used in multiple-table DELETE statement in prepared statements. (Bug #3411)
  • Requiring UPDATE privilege for tables which will not be updated in multiple-table UPDATE statement in prepared statements.
  • Fixed prepared statement support for INSERT, REPLACE, CREATE, DELETE, SELECT, DO, SET and SHOW. All other commands are prohibited via prepared statement interface. (Bug #3398, Bug #3406, Bug #2811)
  • Fixed a lot of bugs in GROUP_CONCAT(). (Bug #2695, Bug #3381, Bug #3319)
  • Added optimization that allows for prepared statements using a large number of tables or tables with a large number of columns to be re-executed significantly faster. (Bug #2050)
  • Fixed bug that caused execution of prepared statements to fail then table that this statement were using left table cache. This bug showed up as if this prepared statement used random garbage as column names or as server crashes. (Bug #3307)
  • Fixed a problem resulting from setting the character_set_results variable to NULL. (Bug #3296)
  • Fixed query cache statistics.
  • Fixed bug in ANALYZE TABLE on a BDB table inside a transaction that hangs server thread. (Bug #2342)
  • Fixed a symlink vulnerability in the `mysqlbug' script. (Bug #3284)
  • Fixed a bug in parallel repair (myisamchk -p, myisam_repair_threads); sometimes the repair process failed to repair a table. (Bug #1334)
  • A query that uses both UNION [DISTINCT] and UNION ALL now works correctly. (Bug #1428)
  • Table default character set affects LONGBLOB columns. (Bug #2821)
  • CONCAT_WS() makes the server die in case of illegal mix of collations. (Bug #3087)
  • UTF8 charset breaks joins with mixed column/string constant. (Bug #2959)
  • Fixed DROP DATABASE to report number of tables deleted.
  • Fixed memory leak in the client library when statement handle was freed on closed connection (call to mysql_stmt_close after mysql_close). (Bug #3073)
  • Fixed server segfaults when processing malformed prepared statements commands. (Bug #2795, Bug #2274)
  • Fixed using subqueries with OR and AND functions. (Bug #2838)
  • Fixed comparison of tables/database names with --lower_case_table_names option. (Bug #2880)
  • Removed try to check NULL if index built on column where NULL is impossible in IN subquery optimization. (Bug #2393)
  • Fixed incorrect parsing of subqueries in the FROM clause. (Bug #2421)
  • Fixed processing of RAND() in subqueries with static tables. (bug #2645)
  • Fixed bug with quoting of table names in mysqldump for various values of sql_mode of server. (Bug #2591)
  • Fixed bug with storing values that are out of range for DOUBLE and FLOAT columns. (Bug #2082)
  • Fixed bug with compiling --with-pstack with binutils 2.13.90. (Bug #1661)
  • Fixed a bug in the GRANT system. When a password was assigned to an account at the global level and then privileges were granted at the database level (without specifying any password), the existing password was replaced temporarily in memory until the next FLUSH PRIVILEGES operation or the server was restarted. (Bug #2953)
  • Fixed a bug in full-text search on multi-byte character set (such as UTF8) that appeared when a search word was shorter than a matching word from the index (for example, searching for ``Uppsala'' when table data contain ``Uppsåla''). (Bug #3011)
  • Fixed a bug that made Max_used_connections to be less than the actual maximum number of connections in use simultaneously.
  • Fixed calculation of Index_length in HEAP table status for BTREE indexes. (Bug #2719)
  • Fixed mysql_stmt_affected_rows() call to always return number of rows affected by given statement. (Bug #2247)
  • Fixed crash in MATCH ... AGAINST() on a phrase search operator with a missing closing double quote. (Bug #2708)
  • Fixed output of mysqldump --tab. (Bug #2705)
  • Fix for a bug in UNION operations that prevented proper handling of NULL columns. This happened only if a column in the first SELECT node was NOT NULL. (Bug #2508)
  • Fix for a bug in UNION operations with InnoDB storage engine, when some columns from one table were used in one SELECT statement and some were used in another SELECT statement. (Bug #2552)
  • Fixed a few years old bug in the range optimizer that caused a segmentation fault on some very rare queries. (Bug #2698)
  • Fixed bug with SHOW CREATE TABLE ... which didn't properly double quotes. (Bug #2593)
  • Queries with subqueries in FROM clause locks all tables at once for now. This also fixed bugs in EXPLAIN of subqueries in FROM output. (Bug #2120)
  • Fixed bug with mysqldump not quoting ``tricky'' names correctly. (Bug #2592)
  • Fix for a bug that prevented table / column privileges from being loaded on startup. (Bug #2546)
  • Fixed bug in replication with CREATE TABLE ... LIKE ... that resulted in a statement not being written to the binary log. (Bug #2557)
  • Fixed memory leak in INSERT ... ON DUPLICATE KEY UPDATE .... (Bug #2438)
  • Fixed bug in the parser, making the syntax CONVERT(expr,type) legal again.
  • Fixed parsing of short-form IP addresses in INET_ATON(). (Bug #2310)
  • Fixed a bug in CREATE ... SELECT that sometimes caused a string column with a multi-byte character set (such as utf8) to have insufficient length to hold the data.
  • Fixed a rare table corruption on adding data (INSERT, REPLACE, UPDATE, etc. but not DELETE) to a FULLTEXT index. (Bug #2417)
  • Compile the MySQL-client RPM package against libreadline instead of libedit. (Bug #2289)
  • Fix for a crashing bug that was caused by not setting vio_timeout() virtual function for all protocols. This bug occurred on Windows. (Bug #2025)
  • Fix for a bug that caused mysql client program to erroneously cache the value of the current database. (Bug #2025)
  • Fix for a bug that caused client/server communication to be broken when mysql_set_server_option() or mysql_get_server_option() were invoked. (Bug #2207)
  • Fix for a bug that caused wong results when CAST() was applied on NULL to signed or unsigned integer column. (Bug #2219)
  • Fix for a crashing bug that occurred in the mysql client program when database name was longer then expected. (Bug #2221)
  • Fixed a bug in CHECK TABLE that sometimes resulted in a spurious error Found key at page ... that points to record outside datafile for a table with a FULLTEXT index. (Bug #2190)
  • Fixed bug in GRANT with table-level privilege handling. (Bug #2178)
  • Fixed bug in ORDER BY on a small column. (Bug #2147)
  • Fixed a bug with the INTERVAL() function when 8 or more comparison arguments are provided. (Bug #1561)
  • Packaging: Fixed a bug in the Mac OS PKG postinstall script (mysql_install_db was called with an obsolete argument).
  • Packaging: Added missing file `mysql_create_system_tables' to the server RPM package. This bug was fixed for the 4.1.1 RPMs by updating the MySQL-server RPM from MySQL-server-4.1.1-0 to MySQL-server-4.1.1-1. The other RPMs were not affected by this change.
  • Fixed a bug in myisamchk and CHECK TABLE that sometimes resulted in a spurious error Found key at page ... that points to record outside datafile for a table with a FULLTEXT index. (Bug #1977)
  • Fixed a hang in full-text indexing of strings in multi-byte (all besides utf8) charsets. (Bug #2065)
  • Fixed a crash in full-text indexing of UTF8 data. (Bug #2033)
  • Replication: a rare race condition in the slave SQL thread that could lead to an incorrect complaint that the relay log is corrupted. (Bug #2011)
  • Replication: If a client connects to a slave server and issues an administrative statement for a table (for example, OPTIMIZE TABLE or REPAIR TABLE), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must use START SLAVE to get replication going again. (Bug #1858)
  • Replication: in the slave SQL thread, a multiple-table UPDATE could produce an incorrect complaint that some record was not found in one table, if the UPDATE was preceded by a INSERT ... SELECT. (Bug #1701)
  • Replication: sometimes the master gets a non-fatal error during the execution of a statement but finally the statements succeeds (for example, a write to a MyISAM table first receives "no space left on device" but is able to finally complete, see section A.4.3 How MySQL Handles a Full Disk); the bug was that the master forgot to reset the error code to 0 after success, so the error code got into its binary log, thus making the slave giving false alarms like "did not get the same error as on master". (Bug #2083)
  • Removed a misleading "check permissions on master.info" from a replication error message, because the cause of the problem could be different from permissions. (Bug #2121)
  • Fixed a crash when the replication slave was unable to create the first relay log. (Bug #2145)
  • ALTER DATABASE caused the client to hang if the database did not exist. (Bug #2333)
  • Multiple-table DELETE statements were never replicated by the slave if there were any --replicate-*-table options. (Bug #2527)
  • Fixed bug in ALTER TABLE RENAME, when rename to the table with the same name in another database silently dropped destination table if it existed. (Bug #2628)
  • The MySQL server did not report any error if a statement (submitted through mysql_real_query() or mysql_stmt_prepare()) was terminated by garbage characters. This can happen if you pass a wrong length parameter to these functions. The result was that the garbage characters were written into the binary log. (Bug #2703)
  • Fixed bug in client library that caused mysql_stmt_fetch and mysql_stmt_store_result() to hang if they were called without prior call of mysql_stmt_execute(). Now they give an error instead. (Bug #2248)
  • Made clearer the error message that one gets when an update is refused because of the --read-only option. (Bug #2757)
  • Fixed that --replicate-wild-*-table rules apply to ALTER DATABASE when the table pattern is %, as is already the case for CREATE DATABASE and DROP DATABASE. (Bug #3000)
  • Fixed that when a Rotate event is found by the slave SQL thread in the middle of a transaction, the value of Relay_Log_Pos in SHOW SLAVE STATUS remains correct. (Bug #3017)
  • Corrected the master's binary log position that InnoDB reports when it is doing a crash recovery on a slave server. (Bug #3015)
  • Changed the column Seconds_Behind_Master in SHOW SLAVE STATUS to never show a value of -1. (Bug #2826)
  • Changed that when a DROP TEMPORARY TABLE statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing a SELECT on the master does not result in a superfluous error on the slave). (Bug #3063)
  • Changed that when a thread handling INSERT DELAYED (also known as a delayed_insert thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug #3081)
  • Fixed deadlock when two START SLAVE commands were run at the same time. (Bug #2921)
  • Fixed that a statement never triggers a superfluous error on the slave, if it must be excluded given the --replicate-* options. The bug was that if the statement had been killed on the master, the slave would stop. (Bug #2983)
  • The --local-load option of mysqlbinlog now requires an argument.
  • Fixed a segmentation fault when running LOAD DATA FROM MASTER after RESET SLAVE. (B