Released on 14 Dec 2004
MySQL 4.1.8 Changelog

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.


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 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

  • MySQL Cluster: Added support for a [mysql_cluster] section to the my.cnf file for configuration settings specific to MySQL Cluster. The ndb-connectstring variable was moved here.

  • Replication: mysqldump --single-transaction --master-data is now able to take an online (nonblocking) 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 4.5.4, “mysqldump — A Database Backup Program”.

  • Added mysql_hex_string() C API function that hex-encodes a string.

  • InnoDB: Do not periodically write SHOW INNODB STATUS information to a temporary file unless the configuration option innodb-status-file = 1 is set.

  • FULLTEXT index block size is changed to be 1024 instead of 2048.

  • 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.

  • 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.

  • Added --hex-blob option to mysqldump for dumping binary string columns using hexadecimal notation.

  • The --master-data option for mysqldump now takes an optional argument of 1 or 2 to produce a noncommented or commented CHANGE MASTER TO statement. The default is 1 for backward compatibility.

  • The statements CREATE TABLE, TRUNCATE TABLE, DROP DATABASE, and CREATE DATABASE cause an implicit commit.

  • Added WITH CONSISTENT SNAPSHOT clause to START TRANSACTION to begin a transaction with a consistent read.

  • For ALTER DATABASE, the database name now can be omitted to apply the change to the default database.

  • Automatic character set conversion formerly was done for operations that mix a column and a string such as assigning a string to a column, when this was possible without loss of information. Automatic conversion for operations that mix columns and strings has been expanded to cover many functions (such as CONCAT()) and assignment operators. This reduces the frequency of Illegal mix of collations errors.

  • 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.

  • mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, and so forth) before each LOAD DATA INFILE, like it does for other queries; unless --short-form is used.

  • In the normal log MySQL now prints the log position for Binlog Dump requests.

  • Added --lock-all-tables to mysqldump to lock all tables by acquiring a global read lock.

  • A connection doing a rollback now displays "Rolling back" in the State column of SHOW PROCESSLIST.

Bugs Fixed

  • Replication: OPTIMIZE TABLE, REPAIR TABLE, and ANALYZE TABLE are now replicated without any error code in the binary log. (Bug #5551)

  • Replication: LOAD DATA INFILE now works with option replicate-rewrite-db. (Bug #6353)

  • Replication: 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)

  • Replication: 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)

  • Using a modified client library, a malicious user could take advantage of an issue in MySQL authentication code to crash the server with specially crafted packets. (Bug #7187)

  • Prevent adding CREATE TABLE .. SELECT query to the binary log when the insertion of new records partially failed. (Bug #6682)

  • Server warnings now are reset when you execute a prepared statement.

  • 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)

  • 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)

  • InnoDB: innodb_data_file_path was not handled correctly in some cases. This bug was introduced in MySQL 4.1.1.

  • InnoDB: Let the InnoDB FOREIGN KEY parser 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.

  • A spurious "duplicate key" error resulted from executing a REPLACE or INSERT ... ON DUPLICATE KEY UPDATE statement performing a multiple-row insert on a table having unique and full-text indexes. (Bug #6784)

  • InnoDB: Made the foreign key parser better aware of quotation marks. (Bug #6340)

  • 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)

  • A reference to a column by name from a WHERE subquery to an outer query, with use of a temporary table by the outer query. (Bug #7079)

  • A spurious Record has changed since last read in table error could be raised by some queries on HEAP tables containing only one row. (Bug #6748)

  • Improved performance of identifier comparisons (if many tables or columns are specified).

  • Execution of subqueries in SET and DO statements caused wrong results to be returned from subsequent queries. (Bug #6462)

  • A multiple-table DELETE could cause MySQL to crash when using InnoDB tables. (Bug #6378, Bug #5837)

  • 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 nontransactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714)

  • INSERT on a table with FULLTEXT indexes, could under rare circumstances result in a corrupted table if words of different lengths could be considered equal. This is possible in some collations such as utf8_general_ci and latin1_german2_ci. (Bug #6265)

  • 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.

  • A prepared statement using SELECT ... PROCEDURE could cause the server to crash.

  • A prepared statement using a subquery could cause the server to crash.

  • Starting and stopping the slave thread (only) could in some circumstance cause the server to crash. (Bug #6148)

  • NULL was not always processed correctly in subqueries using ALL or SOME. (Bug #6247)

  • MySQL required explicit privileges on system time zone description tables for implicit access to them (that is, if one set the time_zone variable or used the CONVERT_TZ() function) in cases where some table-level or column-level privileges already existed. (Bug #6765)

  • mysql_stmt_data_seek(stmt,0) now rewinds a counter and enables buffered rows to be re-fetched on the client side. (Bug #6996)

  • NULL were not handled caorrectly in cases of empty results in subqueries. (Bug #6806)

  • Some internal structures were not initialized correctly prior to first execution. (Bug #6517)

  • InnoDB: innodb_locks_unsafe_for_binlog still uses next-key locking, which is unnecessary next-key. Such locks are now removed when the innodb_locks_unsafe_for_binlog option is enabled. (Bug #6747)

  • Some complex queries did not work correctly with subqueries. (Bug #6841, Bug #6406)

  • If STMT_ATTR_UPDATE_MAX_LENGTH is set for a prepared statement, mysql_stmt_store_result() updates field->max_length for numeric columns as well. (Bug #6096)

  • InnoDB: FOREIGN KEY constraints treated table and database names as case-insensitive, so that RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. The server would also hang if one tried using an ALTER TABLE or RENAME TABLE statement to create a foreign key constraint name that collided with existing one. (Bug #3478)

  • A prepared statement using SELECT * FROM t1 NATURAL JOIN t2... could cause the server to crash.

  • InnoDB: Do not call rewind() when displaying SHOW INNODB STATUS information on stderr.

  • Using the string function LEFT as part of the expression used as GROUP BY column caused the server to crash. (Bug #7101)

  • 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.)

  • GROUP_CONCAT(...ORDER BY) when used with prepared statements gave wrong sorting order.

  • INSERT ... SELECT no longer reports spurious "column truncated" warnings (Bug #6284)

  • The server accepted datetime values with an invalid year part. The server now also performs the same checks for datetime values passed through MYSQL_TIME structures as for datetime values passed as strings. (Bug #6266)

  • Prepared statements now handle ZEROFILL when converting integer to string.

  • 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".

  • 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)

  • A rare memory corruption problem could cause MATCH ... AGAINST on columns using multi-byte character sets to crash the server. (Bug #6269)

  • A call to mysql_stmt_store_result() occurred without a preceding call to mysql_stmt_bind_result() caused the server to crash.

  • Insufficient privilege checks were made for SHOW CREATE TABLE. (Bug #7043)

  • InnoDB: Refuse to open new-style tables created with MySQL 5.0.3 or later. (Bug #7089)

  • Backported a fix for the full-text interface from MySQL 5.0. (Bug #6523)