manual_News.html
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 VIEWSyntax. - 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.3SELECT ... INTOStatement. -
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. SettingSQL_LOG_UPDATEwill silently setSQL_LOG_BINinstead (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;thenSELECT @A;will now return10. 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.
-
VARCHARfields now remembers end space. AVARCHAR()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) andeucjpms(UJIS for Windows Japanese) character sets. -
Added several
InnoDBstatus variables. See section 5.2.4 Server Status Variables. -
Added the
FEDERATEDstorage engine. See section 14.6 TheFEDERATEDStorage Engine. -
SHOW CREATE TABLEnow usesUSING index_typerather thanTYPE index_typeto specify an index type. (Bug #7233) -
Added an
errormember to theMYSQL_BINDdata 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 newMYSQL_REPORT_DATA_TRUNCATIONoption for themysql_options()C API function. -
API change: the
reconnectflag in theMYSQLstructure is now set to 0 bymysql_real_connect(). Only those client programs which didn't explicitely set this flag to 0 or 1 aftermysql_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 LOCKis now killable while it's waiting for runningCOMMITstatements to finish. -
VARCHARcolumns now remember end space. AVARCHAR()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 newVARCHARtype, then it's converted to aCHARcolumn. Currently this happens forNDBandInnoDBtables. -
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_INCREMENTvalue for the table usingCREATE TABLE...AUTO_INCREMENT =works now also for theInnoDBtable. -
Seconds_Behind_Masterwill beNULL(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-binoption 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
MyISAMtables 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-indexand without--log-bin, and when started with--log-slave-updatesand without--log-bin. -
If the MySQL server is started without an argument to
--log-binand 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_CONNECTIONSlimit, 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-limitsoption to get old behavior.
Bugs fixed:
-
Fixed a bug in
max_heap_table_sizehandling, that resulted inTable is fullerror when the table was still smaller than the limit. (Bug #7791). -
Fixed a symlink vulnerability in the
mysqlaccessscript. 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 .. SELECTquery 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
mysqldaSIGHUPcaused it to crash. -
Changed semantics of
CREATE/ALTER/DROP DATABASEstatements so that replication ofCREATE DATABASEis possible when using--binlog-do-dband--binlog-ignore-db. (Bug #6391) -
A sequence of
BEGIN(orSET AUTOCOMMIT=0),FLUSH TABLES WITH READ LOCK, transactional update,COMMIT,FLUSH TABLES WITH READ LOCKcould hang the connection forever and possibly the MySQL server itself. This happened for example when running theinnobackupscript several times. (Bug #6732) -
mysqlbinlogdid not printSET PSEUDO_THREAD_IDstatements in front ofLOAD DATA INFILEstatements 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).
InnoDBnow supportsALTER TABLE...AUTO_INCREMENT = xquery to set auto increment value for a table. -
Made the MySQL server accept executing
SHOW CREATE DATABASEeven if the connection has an open transaction or locked tables; refusing it mademysqldump --single-transactionsometimes fail to print a completeCREATE DATABASEstatement for some dumped databases. (Bug #7358) -
Fixed that, when encountering a ``disk full'' or ``quota exceeded'' write
error,
MyISAMsometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714) -
Fixed that
--expire-log-dayswas not honored if using only transactions. (Bug #7236) -
Fixed that a slave could crash after replicating many
ANALYZE TABLE,OPTIMIZE TABLE, orREPAIR TABLEstatements 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
NOToperator has changed so that expressions such asNOT a BETWEEN b AND care parsed correctly asNOT (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 newHIGH_NOT_PRECEDENCESQL mode. -
Added
IS [NOT] boolean_valuesyntax, where boolean_value isTRUE,FALSE, orUNKNOWN. -
Added several
InnoDBstatus variables. See section 5.2.4 Server Status Variables. -
Implemented the
WITH CHECK OPTIONclause forCREATE VIEW. -
CHECK TABLEnow works for views. -
The
SCHEMAandSCHEMASkeywords are now accepted as synonyms forDATABASEandDATABASES. -
Added initial support for rudimentary triggers (the
CREATE TRIGGERandDROP TRIGGERstatements). - Added basic support for read-only server side cursors.
-
mysqldump --single-transaction --master-datais 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 ThemysqldumpDatabase Backup Program. -
Added
--start-datetime,--stop-datetime,--start-position,--stop-positionoptions tomysqlbinlog(makes point-in-time recovery easier). -
Made the MySQL server not react to signals
SIGHUPandSIGQUITon 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-incrementand--auto-increment-offsetstartup 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_DATESSQL mode. -
Added
STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, andTRADITIONALSQL modes. TheTRADITIONALmode is shorthand for all the preceding modes. When using modeTRADITIONAL, 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_TABLESmode, you now get an error if you do anINSERTwithout specifying all columns that don't have a default value. A side effect of this is that when you doSHOW CREATEfor a new table, you will no longer see aDEFAULTvalue for a column for which you didn't specify a default value. -
The compilation flag
DONT_USE_DEFAULT_FIELDSwas removed because you can get the same behavior by setting thesql_modesystem variable toSTRICT_TRANS_TABLES. -
Added
NO_AUTO_CREATE_USERSQL mode to preventGRANTfrom 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_keysystem variable toupdatable_views_with_limit. This variable now can have only two values:-
1orYES: 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 aLIMITclause for updating. (This is the default value.) -
0orNO: Prohibit update of a VIEW, which does not contain a key in the underlying table and the query uses aLIMITclause (usually get from GUI tools).
-
-
Reverted output format of
SHOW TABLESto old pre-5.0.1 format that did not include a table type column. To get the additional column that lists the table type, useSHOW FULL TABLESnow. -
The
mysql_fix_privilege_tablesscript now initializes the globalCREATE VIEWandSHOW VIEWprivileges in theusertable to the value of theCREATEprivilege in that table. -
If the server finds that the
usertable has not been upgraded to include the view-related privilege columns, it treats each account as having view privileges that are the same as itsCREATEprivilege. -
InnoDB: If you specify the option
innodb_locks_unsafe_for_binlogin `my.cnf', InnoDB in anUPDATEor aDELETEonly 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
Statecolumn ofSHOW PROCESSLIST. -
mysqlbinlognow prints an informative commented line (thread id, timestamp, server id, etc) before eachLOAD DATA INFILE, like it already does for other queries; unless--short-formis used.
Bugs fixed:
-
Fixed that
mysqlbinlog --read-from-remote-serversometimes couldn't accept two binary logfiles on the command line. (Bug #4507) -
Fixed that
mysqlbinlog --position --read-from-remote-serverhad incorrect# atlines. (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 disableLOAD DATA LOCAL INFILE. (Bug #5038) -
Fixed that
disable-local-infileoption had no effect if client read it from a configuration file usingmysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073) -
Fixed that
SET GLOBAL SYNC_BINLOGdid not work on some platforms (Mac OS X). (Bug #5064) -
Fixed that
mysql-test-runfailed on therpl_trunc_binlogtest if running test from the installed (the target of 'make install') directory. (Bug #5050) -
Fixed that
mysql-test-runfailed on thegrant_cachetest 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 doingSTART SLAVE. (Bug #4827) -
Made
FLUSH TABLES WITH READ LOCKblockCOMMITif 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_incrementcolumn was not reset byTRUNCATE TABLEis 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 theSET). (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, thenCOMMIT, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDBinnobackupscript. (Bug #5949) -
OPTIMIZE TABLE,REPAIR TABLE, andANALYZE TABLEare 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 UPDATEthen 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
BEGINandROLLBACKbinary 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
SELECTis slow, but even usingEXPLAINfor it takes a noticeable amount of time.) Two new system variables,optimizer_search_depthandoptimizer_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.52mysql_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_nameis in effect. -
Explicit
USE db_namestatements no longer are allowed in a stored procedure.
-
Fixed
SHOW TABLESoutput field name and values according to standard. Field name changed fromTypetotable_type, values areBASE TABLE,VIEWandERROR. (Bug #4603) -
Added the
sql_updatable_view_keysystem variable. -
Added the
--replicate-same-server-idserver option. -
Added
Last_query_coststatus variable that reports optimizer cost for last compiled query. -
Added the
--to-last-logoption tomysqlbinlog, for use in conjunction with--read-from-remote-server. -
Added the
--innodb-safe-binlogserver option, which adds consistency guarantees between the content ofInnoDBtables and the binary log. See section 5.9.4 The Binary Log. -
OPTIMIZE TABLEforInnoDBtables is now mapped toALTER TABLEinstead ofANALYZE TABLE. -
sync_frmis now a settable global variable (not only a startup option). -
For replication of
MEMORY(HEAP) tables: Made the master automatically write aDELETE FROMstatement to its binary log when aMEMORYtable is opened for the first time since master's startup. This is for the case where the slave has replicated a non-emptyMEMORYtable, then the master is shut down and restarted: the table is now empty on master; theDELETE FROMempties 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-fileoption to populate theMEMORYtable 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 EXISTSinstead ofDROP TEMPORARY TABLE, for more robustness. -
The MySQL server now returns an error if
SET SQL_LOG_BINis issued by a user without theSUPERprivilege (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-binoption was used), then no transaction binary log cache is allocated for connections. This should savebinlog_cache_sizebytes of memory (32KB by default) for every connection. -
Added the
sync_binlog=Nglobal 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-tableDELETE, and single-tableUPDATEnow are written to the binary log even if they changed nothing on the master (for example, even if aDELETEmatched no rows). The old behavior sometimes caused bad surprises in replication setups. -
Replication and
mysqlbinlognow 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 TABLEstatement does not result in the table being marked as ``corrupted'' any more; the table remains as ifCHECK TABLEhad not even started. See section 13.5.5.3KILLSyntax.
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 DATABASEcaused the client to hang if the database did not exist. (Bug #2333) -
SLAVE START(which is a deprecated syntax,START SLAVEshould be used instead) could crash the slave. (Bug #2516) -
Multiple-table
DELETEstatements were never replicated by the slave if there were any--replicate-*-tableoptions. (Bug #2527) -
The MySQL server did not report any error if a statement (submitted through
mysql_real_query()ormysql_stmt_prepare()) was terminated by garbage characters. This can happen if you pass a wronglengthparameter 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 TABLEorREPAIR TABLE), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must useSTART SLAVEto get replication going again. (Bug #1858) -
Made clearer the error message that one gets when an update is refused because
of the
--read-onlyoption. (Bug #2757) -
Fixed that
--replicate-wild-*-tablerules apply toALTER DATABASEwhen the table pattern is%, as is already the case forCREATE DATABASEandDROP DATABASE. (Bug #3000) -
Fixed that when a
Rotateevent is found by the slave SQL thread in the middle of a transaction, the value ofRelay_Log_PosinSHOW SLAVE STATUSremains correct. (Bug #3017) -
Corrected the master's binary log position that
InnoDBreports when it is doing a crash recovery on a slave server. (Bug #3015) -
Changed the column
Seconds_Behind_MasterinSHOW SLAVE STATUSto never show a value of -1. (Bug #2826) -
Changed that when a
DROP TEMPORARY TABLEstatement 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 aSELECTon 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 adelayed_insertthread) 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 SLAVEcommands 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-loadoption ofmysqlbinlognow requires an argument. -
Fixed a segmentation fault when running
LOAD DATA FROM MASTERafterRESET SLAVE. (Bug #2922) -
mysqlbinlog --read-from-remote-serverread 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-logto get the old behavior. (Bug #3204) -
Fixed
mysqlbinlog --read-from-remote-serverto 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 numberand stop when it was not necessary to do so. (Bug #3401) -
Fixed
mysqlbinlognot to forget to print aUSEstatement under rare circumstances where the binary log contained aLOAD DATA INFILEstatement. (Bug #3415) -
Fixed a memory corruption when replicating a
LOAD DATA INFILEwhen the master had version 3.23. (Bug #3422) -
Multiple-table
DELETEstatements were always replicated by the slave if there were some--replicate-*-ignore-tableoptions and no--replicate-*-do-tableoptions. (Bug #3461) -
Fixed a crash of the MySQL slave server when it was built with
--with-debugand 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-idwas not set using startup options but withSET GLOBAL, the replication slave still complained that it was not set. (Bug #3829) -
mysql_fix_privilege_tablesdidn'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,
mysqldwas run as therootsystem user, and if you had--log-bin=<somewhere_out_of_var_lib_mysql>it created binary log files owned byrootin this directory, which remained owned byrootafter the installation. This is now fixed by startingmysqldas themysqlsystem user instead. (Bug #4038) -
Made
DROP DATABASEhonor the value oflower_case_table_names. (Bug #4066) -
The slave SQL thread refused to replicate
INSERT ... SELECTif it examined more than 4 billion rows. (Bug #3871) -
mysqlbinlogdidn'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/ORexpressions if query was ignored (either by a replication server because of--replicate-*-tablerules, or by any MySQL server because of a syntax error). (Bug #3969, Bug #4494) -
If
CREATE TEMPORARY TABLE t SELECTfailed while loading the data, the temporary table was not dropped. (Bug #4551) -
Fixed that when a multiple-table
DROP TABLEfailed 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 INFILEstatement, it didn't show the statement in the output ofSHOW PROCESSLIST. (Bug #4326)
D.1.4 Changes in release 5.0.0 (22 Dec 2003: Alpha)
Functionality added or changed:
-
The
KILLstatement now takesCONNECTIONandQUERYmodifiers. The first is the same asKILLwith no modifier (it kills a given connection thread). The second kills only the statement currently being executed by the connection. -
Added
TIMESTAMPADD()andTIMESTAMPDIFF()functions. -
Added
WEEKandQUARTERvalues asINTERVALarguments for theDATE_ADD()andDATE_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
ORclauses. 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.3SELECT ... INTOStatement. - 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,
InnoDBis 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 toUPDATEan existing row if the insert would cause a duplicate value in aPRIMARYorUNIQUEkey. (REPLACEallows you to overwrite an existing row, which is something entirely different.) See section 13.1.4INSERTSyntax. -
A newly designed
GROUP_CONCAT()aggregate function. See section 12.9 Functions and Modifiers for Use withGROUP BYClauses. - 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
MyISAMtables with many tunable parameters. You can have multiple key caches, preload index into caches for batches... -
BTREEindex onHEAPtables. - Support for OpenGIS spatial types (geographical data). See section 18 Spatial Extensions in MySQL.
-
SHOW WARNINGSshows warnings for the last command. See section 13.5.4.20SHOW WARNINGSSyntax. - 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
HELPcommand that can be used in themysqlcommand-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_sizehandling, that resulted inTable is fullerror when the table was still smaller than the limit. (Bug #7791). -
Fixed a symlink vulnerability in the
mysqlaccessscript. 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
-winto-win32 -
The product descriptions
-noinstalland-essentialhave been moved in front of the version number
-
The platform suffix was changed from
- 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_Masterwill beNULL(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
InnoDBtable lock inLOCK TABLESifAUTOCOMMIT=1. This helps in porting oldMyISAMapplications toInnoDB.InnoDBtable locks in that case caused deadlocks very easily. -
InnoDB: Print a more descriptive error and refuse to start
InnoDBif the size of `ibdata' files is smaller than what is stored in the tablespace header;innodb_force_recoveryoverrides this. -
The MySQL server aborts immediately instead of simply issuing a warning if
it is started with the
--log-binoption 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
MyISAMwhen 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_tablein `my.cnf'. If you shut downmysqld, records could disappear from the secondary indexes of a table. (Bug #7496) -
InnoDB: Fixed a bug: 32-bit
mysqldbinaries built on HP-UX-11 did not work withInnoDBfiles greater than 2 GB in size. (Bug #6189) -
InnoDB: Return a sensible error code from
DISCARD TABLESPACEif it fails because the table is referenced by aFOREIGN KEY. -
InnoDB: Fixed a bug:
InnoDBfailed to drop a table in the background drop queue if the table was referenced by aFOREIGN KEYconstraint. -
InnoDB: Fixed a bug: if we dropped a table where an
INSERTwas waiting for a lock to check aFOREIGN KEYconstraint, then an assertion would fail inlock_reset_all_on_table(). -
InnoDB: Fix a little bug: we looked at the physical size of a stored
SQL
NULLvalue 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 disabledfsync()in Mac OS X for internal disk drives, which caused corruption at power outages. -
mysqladmin passwordnow checks whether the server has--old-passwordsturned on or predates 4.1 and uses the old-format password if so. (Bug #7451) -
Added a
--default-character-setoption tomysqladminto avoid problems when the default character set is notlatin1. (Bug #7524) -
Fix a problem with truncation of
FLOATvalues. (Bug #7361) -
Fixed a bug in
PROCEDURE ANALYSE(), which did not quote someENUMvalues properly. (Bug #2813) -
Fixed a bug that caused incorrect results for complex datetime expressions
containing casts of datetime values to
TIMEorDATEvalues. (Bug #6914) -
Include compression library flags in the output from
mysql_config --lib_r. (Bug #7021) -
Corrected a problem with
mysql_confignot producing all relevant flags fromCFLAGS. (Bug #6964) -
Corrected a problem with
mysqld_safenot properly capturing output fromps. (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_DATEfunction, if there is some other specifier in the format string following%f. (Bugs #7458) -
Made the MySQL server accept executing
SHOW CREATE DATABASEeven if the connection has an open transaction or locked tables. Refusing it mademysqldump --single-transactionsometimes fail to print a completeCREATE DATABASEstatement for some dumped databases. (Bug #7358) -
Fixed that, when encountering a ``disk full'' or ``quota exceeded'' write
error,
MyISAMsometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714) -
Fixed that
--expire-log-dayswas not honored if using only transactions. (Bug #7236) -
Fixed that a slave could crash after replicating many
ANALYZE TABLE,OPTIMIZE TABLE, orREPAIR TABLEstatements 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 SNAPSHOTclause toSTART TRANSACTIONto begin a transaction with a consistent read. -
Added
--order-by-primarytomysqldump, 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 STATUSinformation to a temporary file unless the configuration optioninnodb_status_file=1is set. -
InnoDB: Commit after every 10,000 copied rows when executing
ALTER TABLE. This makes it much faster to recover from an abortedALTER TABLEorOPTIMIZE TABLE. -
FULLTEXTindex block size is changed to be 1024 instead of 2048. -
Added
--disable-log-binoption tomysqlbinlog. Using this option you can disable binary logging for the statements produced bymysqlbinlog. That is,mysqlbinlog --disable-log-bin <file_name> | mysqlwon't write any statements to the MySQL server binary log. -
The
--master-dataoption formysqldumpnow takes an optional argument of 1 or 2 to produce a non-commented or commentedCHANGE MASTER TOstatement. The default is 1 for backward compatibility. -
mysqldump --single-transaction --master-datanow 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 ThemysqldumpDatabase Backup Program. -
Added
--lock-all-tablestomysqldumpto lock all tables by acquiring a global read lock. -
Added
--hex-bloboption tomysqldumpfor 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 Dumprequests. -
Added
[mysql_cluster]section to `my.cnf' file for configuration settings specific to MySQL Cluster.ndb-connectstringvariable moved here. -
A connection doing a rollback will now display "Rolling back" in the
Statecolumn ofSHOW PROCESSLIST. -
mysqlbinlognow prints an informative commented line (thread id, timestamp, server id, etc) before eachLOAD DATA INFILE, like it already does for other queries; unless--short-formis 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
WHEREclause. (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 asGROUP BYfield. (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_zonevariable or usedCONVERT_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 TABLEcommand. (Bug #7043) -
Fixed a rare memory corruption (that resulted in a crash) in
MATCH ... AGAINSTon 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 .. SELECTquery to the binary log when the insertion of new records partially failed. (Bug #6682) -
INSERT ... SELECTno 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
HEAPtables that contain only one row. (Bug #6748) -
mysqld_safewas in many cases ignoring any--no-defaults,--defaults-file, or--defaults-extra-filearguments. Those arguments are now honored, and this may change what options are passed tomysqldin some installations. -
The server was interpreting
CHAR BINARYandVARCHAR BINARYcolumns from 4.0 tables as having theBINARYandVARBINARYdata types. Now they are interpreted asCHARandVARCHARcolumns that have the binary collation of the column's character set. (This is the same way thatCHAR BINARYandVARCHAR BINARYare handled for new tables created in 4.1.) -
Fixed spurious "duplicate key" error from
REPLACEorINSERT ... ON DUPLICATE KEY UPDATEstatements performing multiple-row insert in the table that had unique and fulltext indexes. (Bug #6784) -
Fixed a bug in execution of subqueries in
SETandDOstatements 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_TIMEstructure as for datetime values passed as strings. (Bug #6266) -
Fixed a bug with
INSERTfor a table withFULLTEXTindexes. 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, inutf8_general_ciorlatin1_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 KEYparser to remove thelatin1character0xA0from the end of an unquoted identifier. The EMS MySQL Manager inALTER TABLEadds 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 displayingSHOW INNODB STATUSinformation onstderr. - InnoDB: Made the foreign key parser better aware of quotes. (Bug #6340)
-
InnoDB: If one used
INSERT IGNOREto insert several rows at a time, and the first inserts were ignored because of a duplicate key collision, then InnoDB in a replication slave assignedAUTO_INCREMENTvalues 1 bigger than in the master. This broke the MySQL replication. (Bug #6287) -
InnoDB: Fixed a bug: InnoDB ignored in
innodb_data_file_paththemaxspecification in:autoextend:max:2000M. This bug was introduced in 4.1.1. -
InnoDB: Fixed a bug:
innodb_locks_unsafe_for_binlogstill 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 wheninnodb_locks_unsafe_for_binlogoption is used. -
InnoDB: Fix two hangs:
FOREIGN KEYconstraints treated table and database names as case-insensitive.RENAME TABLE t TO Twould hang in an endless loop ifthad a foreign key constraint defined on it. Fix also a hang over the dictionary mutex that would occur if one tried inALTER TABLEorRENAME TABLEto create a foreign key constraint name that collided with another existing name. (Bug #3478) -
If
STMT_ATTR_UPDATE_MAX_LENGTHis set for a prepared statement,mysql_stmt_store_result()will updatefield->max_lengthfor numeric columns as well. (Bug#6096) -
Prepared statements now handle
ZEROFILLwhen convertingintegertostring. -
Fixed crash when a call to
mysql_stmt_store_result()occurred without a preceding call tomysql_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_tabledidn't signal when table was created. This could cause aDROP TABLE created_tablein 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, andANALYZE TABLEare now replicated without any error code in the binary log. (Bug #5551) -
LOAD DATA INFILEnow 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 DATABASEstatements so that replication ofCREATE DATABASEis possible when using--binlog-do-dband--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 UPDATEthen 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
BEGINandROLLBACKbinary log events; that caused superfluous slave stops. (Bug #6522) -
A sequence of
BEGIN(orSET AUTOCOMMIT=0),FLUSH TABLES WITH READ LOCK, transactional update,COMMIT,FLUSH TABLES WITH READ LOCKcould hang the connection forever and possibly the MySQL server itself. This happened for example when running theinnobackupscript several times. (Bug #6732) -
mysqlbinlogdid not printSET PSEUDO_THREAD_IDstatements in front ofLOAD DATA INFILEstatements 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_locksfor makingLOCK TABLEacquire alsoInnoDBlocks. The default value is 1, which means thatLOCK TABLEScauses also InnoDB internally to take a table lock. In applications usingAUTOCOMMIT=1andLOCK TABLES, InnoDB's internal table locks that were added in 4.0.20 and 4.1.2 can cause deadlocks. You can setinnodb_table_locks=0in `my.cnf' to remove that problem. (Bug #3299, Bug #5998) -
See section 15.17 Restrictions on
InnoDBTables. (Bug #3299, Bug #5998) InnoDB:SHOW TABLE STATUSnow shows the creation time of the table for InnoDB. Note that this timestamp might not be the correct time because, e.g.,ALTER TABLEchanges this timestamp. -
InnoDB: If
innodb_thread_concurrencywould 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 withLIMITclause in prepared statements. (Bug#6088) -
Fixed a bug with
NATURAL JOINin 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_zonevariable or useCONVERT_TZ()function) does not require any privileges. (Bug #6116) -
Fixed a bug which caused the server to crash when the deprecated
libmysqlclientfunctionmysql_create_db()was called. (Bug #6081) -
Fixed
REVOKE ALL PRIVILEGES, GRANT OPTION FROM userso 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
HEAPtable withkey_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…REPLACEprinting 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
SELECTstatements not returning a result set (such asSELECT ... 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
libmysqlclientwith wrong conversion of negative time values to strings. (Bug #6049). -
Fixed a bug in
libmysqlclientwith 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, andDATETIMEcolumns 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
TINYINTcolumns in the binary protocol. The problem is specific to platforms where the C compiler has thechardata 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, thenCOMMIT, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDBinnobackupscript. (Bug #5949) -
InnoDB: Release the dictionary latch during a long cascaded
FOREIGN KEYoperation, so that we do not starve other users doingCREATE TABLEor 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-ignoreto themysqlcommand line client to make it ignoreSIGINTsignals (typically the result of the user pressing Control-C). -
InnoDB: Added the startup option and settable global variable
innodb_max_purge_lagfor delayingINSERT,UPDATEandDELETEoperations 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_incrementstartup option that was introduced in release 4.1.5 was made a settable global variable. (Bug #5736) -
InnoDB: If
DROP TABLEis invoked on an InnoDB table for which the.ibdfile is missing, print to error log that the table was removed from theInnoDBdata dictionary, and allow MySQL to delete the.frmfile. MaybeDROP TABLEshould issue a warning in this case. -
TIMESTAMPcolumns now can storeNULLvalues. To create such a column, you must explicitly specify theNULLattribute in the column specification. (Unlike all other column types,TIMESTAMPcolumns areNOT NULLby default.) -
Now if
ALTER TABLEconverts oneAUTO_INCREMENTcolumn to anotherAUTO_INCREMENTcolumn it will preserve zero values (this includes the case that we don't change such column at all). -
Now if
ALTER TABLEconverts some column toTIMESTAMP NOT NULLcolumn it will convertNULLvalues to current timestamp value (One can still get old behavior by setting systemTIMESTAMPvariable 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 KEYparser that preventedALTER TABLEof tables containing `#' in their names. (Bug #5856) -
InnoDB: Fixed a bug that prevented
ALTER TABLE t DISCARD TABLESPACEfrom working. (Bug #5851) -
InnoDB:
SHOW CREATE TABLEnow obeys theSET SQL_MODE=ANSIandSET SQL_QUOTE_SHOW_CREATE=0settings. (Bug #5292) -
InnoDB: Fixed a bug that caused
CREATE TEMPORARY TABLE ... ENGINE=InnoDBto terminatemysqldwhen running ininnodb_file_per_tablemode. Per-table tablespaces for temporary tables will from now on be created in the temporary directory ofmysqld. (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 (
TEXTorBLOB) 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_REFERENCEDif we cannotDROPa parent table referenced by aFOREIGN KEYconstraint; this error number is less misleading than the previous numberHA_ERR_CANNOT_ADD_FOREIGN, but misleading still. -
Fixed
REVOKE ALL PRIVILEGES, GRANT OPTION FROM userso 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
NULLinto anAUTO_INCREMENTcolumn 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 theSET). (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
MyISAMtable 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
FROMclause when it resolvesGROUP BYclause (e.g.SELECT t1.a AS c FROM t1, t2 ORDER BY awill produce an error if botht1andt2tables containacolumn). (Bug #4302) -
Behavior of
ALTER TABLEconverting column containingNULLvalues toAUTO_INCREMENTcolumn is no longer affected byNO_AUTO_VALUE_ON_ZEROmode. (Bug #5915).
D.2.6 Changes in release 4.1.5 (16 Sep 2004)
Functionality added or changed:
-
InnoDB: Added configuration optioninnodb_autoextend_incrementfor setting the size in megabytes by whichInnoDBtablespaces 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, andgroup_concat_max_lensystem 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 likedefault .07asidentifier.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
LIKEused 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 TABLEthat could cause table corruption onFULLTEXTindexes. (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
CSVstorage engine. -
Made internal representation of
TIMESTAMPvalues inInnoDBin 4.1 to be the same as in 4.0. This difference resulted in incorrect datetime values inTIMESTAMPcolumns inInnoDBtables 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 usemysqldumpfor saving and then restoring yourInnoDBtables withTIMESTAMPcolumns. -
The
mysqld-optWindows server was renamed tomysqld. 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
ucs2andutf8Unicode character sets. These are calleducs2_roman_ciandutf8_roman_ci. -
Corrected the name of the Mac OS X StartupItem script (it must match the name
of the subdirectory, which was renamed to
MySQLCOMin MySQL 4.1.2). Thanks to Bryan McCormack for reporting this. -
Added
--start-datetime,--stop-datetime,--start-position, and--stop-positionoptions tomysqlbinlog. These make point-in-time recovery easier. -
Killing a
CHECK TABLEstatement does not result in the table being marked as ``corrupted'' any more; the table remains as ifCHECK TABLEhad not even started. See section 13.5.5.3KILLSyntax. -
Made the MySQL server ignore
SIGHUPandSIGQUITon 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 BYandGROUP BYwas dropped. For example the following querySELECT a AS b FROM t1 ORDER BY t1.bis not allowed. One should useSELECT a AS b FROM t1 ORDER BY t1.aorSELECT a AS b FROM t1 ORDER BY binstead. 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
MEDIUMINTcolumn. (Bug #5126) -
Fixed a bug that caused the MySQL server to crash when attempting to execute
a prepared statement with
SELECT ... INTO @varfor a second time. (Bug #5034) -
Fixed execution of optimized
INsubqueries 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 STOPif the IO thread was in a special state. (Bug #4629) -
Fixed an old bug in concurrent accesses to
MERGEtables (even oneMERGEtable andMyISAMtables), 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
NOTinWHEREorONclauses. (Bug #4912) -
MATCH ... AGAINSTnow 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, %vand%X, %xformat specifiers was added toSTR_TO_DATE()function. (Bug #4756) -
Fixed a bug (hang) in
NATURAL JOINwhere joined table had no common column. (Bug #4807) -
Fixed a crash caused by
UNHEX(NULL). (Bug #4441) -
mysql_fix_privilege_tablesdidn't correctly handle the argument of its--password=#option. (Bug #4240, Bug #4543) -
Fixed that
mysqlbinlog --read-from-remote-serversometimes couldn't accept 2 binary logs on command line. (Bug #4507) -
Fixed that
mysqlbinlog --position --read-from-remote-serverhad wrong# atlines. (Bug #4506) -
If
CREATE TEMPORARY TABLE t SELECTfailed while loading the data, the temporary table was not dropped. (Bug #4551) -
Fixed that when a multiple-table
DROP TABLEfailed 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 INFILEstatement, it didn't show the statement in the output ofSHOW 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 disableLOAD DATA LOCAL INFILE. (Bug #5038) -
Fixed that
disable-local-infileoption had no effect if client read it from a configuration file usingmysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073) -
Fixed that
SET GLOBAL SYNC_BINLOGdid not work on some platforms (Mac OS X). (Bug #5064) -
Fixed that
mysql-test-runfailed on therpl_trunc_binlogtest if running test from the installed (the target of 'make install') directory. (Bug #5050) -
Fixed that
mysql-test-runfailed on thegrant_cachetest 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 doingSTART SLAVE. (Bug #4827) -
Made
FLUSH TABLES WITH READ LOCKblockCOMMITif 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_incrementcolumn was not reset byTRUNCATE TABLEif the table was a temporary table. (Bug #5033) -
Fixed bug which caused error to be reported when column from
ORDER BYclause was present in two tables participating inSELECTeven 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
ARCHIVEstorage engine. - Added SQL syntax for prepared statements. See section 13.7 SQL Syntax for Prepared Statements.
-
Language-specific collations were added for the
ucs2andutf8Unicode 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_zonesystem 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 likeCURRENT_TIMESTAMP,UNIX_TIMESTAMP, and so forth honor this time zone. Values ofTIMESTAMPtype are also interpreted as values in this time zone. So now ourTIMESTAMPtype behaves similar to Oracle'sTIMESTAMP 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
timezonesystem variable has been removed and replaced bysystem_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 TABLEnow can be killed. It will then mark the table as corrupted. See section 13.5.5.3KILLSyntax. -
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.52mysql_shutdown(). -
OPTIMIZE TABLEforInnoDBtables is now mapped toALTER TABLEinstead ofANALYZE TABLE. -
sync_frmis now a settable global variable (not only a startup option). -
Added the
sync_binlog=Nglobal 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-tableDELETEand single-tableUPDATEare now written to the binary log even if they changed nothing on the master (for example, even if theDELETEmatched no row). The old behavior sometimes caused bad surprises in replication setups. -
Replication and
mysqlbinlognow 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-binlogserver option, which adds consistency guarantees between the content ofInnoDBtables and the binary log. See section 5.9.4 The Binary Log. -
LIKEnow supports the use of a prepared statement parameter or delimited constant expression as the argument toESCAPE(Bug #4200).
Bugs fixed:
-
Fixed
CREATE DATABASE IF NOT EXISTSfor Win32 which caused an error if database existed. (Bug #4378) -
Added missing
rootaccount to Windows version ofmysqld. (Bug #4242) -
Fixed bug in prepared
EXPLAINstatement 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
MERGEtables created withINSERT_METHOD=LAST, that were not able to report a key number that caused ``Duplicate entry'' error forUNIQUEkey inINSERT. As a result, error message was not precise enough (error 1022 instead of error 1062) andINSERT ... ON DUPLICATE KEY UPDATEdid not work. (Bug #4008) -
Fixed a bug in
DELETEfrom a table withFULLTEXTindexes 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, inutf8_general_ciorlatin1_german2_ci.) (Bug #3808) -
Fixed too-early unlocking of tables if we have subquery in
HAVINGclause. (Bug #3984) -
Fixed a bug in
mysqldumpwhen 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_TIMEapplication 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
DATETIMEorTIMESTAMPcolumn. (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
NULLand derived tables. (Bug #4097) -
Fixed wrong
UNIONresults 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 failedmysql_stmt_fetch(). (Bug #4079) -
Fixed bug of re-execution optimized
COUNT(*),MAX()andMIN()functions in prepared statements. (Bug #2687) -
Fixed a bug with
COUNT(DISTINCT)performance degradation in cases likeCOUNT(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 inutf8_general_ciorlatin1_german2_ci.) (Bug #3964) -
Fixed a bug in prepared statements protocol, when microseconds part of
MYSQL_TYPE_TIME/MYSQL_TYPE_DATETIMEcolumns was not sent to the client. (Bug #4026) -
Fixed a bug that using
--with-charsetwithconfiguredidn'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,
mysqldwas run as therootsystem 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 byrootin this directory that remained owned byrootafter the installation. This is now fixed by startingmysqldas themysqlsystem user instead. (Bug #4038) -
Made
DROP DATABASEhonor the value oflower_case_table_names. (Bug #4066) -
The slave SQL thread refused to replicate
INSERT ... SELECTif it examined more than 4 billion rows. (Bug #3871) -
mysqlbinlogdidn'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/ORexpressions if query was ignored (either by a replication server because of--replicate-*-tablerules, 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
EXAMPLEstorage engine. -
The
mysqldWindows server was renamed tomysqld-debug. See section 2.3.9 Selecting a MySQL Server type. -
Added
Handler_discoverstatus variable. -
Added support for character set conversion and
MYSQL_TYPE_BLOBtype code in prepared statement protocol. -
Added explanation of hidden
SELECTofUNIONin output ofEXPLAIN SELECTstatement. -
mysqlcommand-line client now supports multiple-eoptions. (Bug #591) -
New
myisam_data_pointer_sizesystem variable. See section 5.2.3 Server System Variables. -
The
--log-warningsserver option now is enabled by default. Disable with--skip-log-warnings. -
The
--defaults-file=file_nameoption now requires that the filename must exist (safety fix). (Bug #3413) -
mysqld_multinow creates the log in the directory named bydatadir(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 aCHARorVARCHARcolumn in some row has a value with the last character less thanASCII(32), you will have to repair this table.CHECK TABLESwill tell you if this problem exists. (Bug #3152) -
Added support for
DEFAULT CURRENT_TIMESTAMPand forON UPDATE CURRENT_TIMESTAMPspecifications forTIMESTAMPcolumns. Now you can explicitly say that aTIMESTAMPcolumn should be set automatically to the current timestamp forINSERTand/orUPDATEstatements, or even prevent the column from updating automatically. Only one column with such an auto-set feature per table is supported.TIMESTAMPcolumns created with earlier versions of MySQL behave as before. Behavior ofTIMESTAMPcolumns that were created without explicit specification of default/on as earlier depends on its position in table: If it is the firstTIMESTAMPcolumn, it will be treated as having been specified asTIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. In other cases, it would be treated as aTIMESTAMP DEFAULT 0column.NOWis supported as an alias forCURRENT_TIMESTAMP. Warning: Incompatible change! Unlike in previous versions, explicit specification of default values forTIMESTAMPcolumn is never ignored and turns off the auto-set feature (unless you haveCURRENT_TIMESTAMPas the default). -
Warning: Incompatible change!
Renamed prepared statements C API functions:
Now all functions that operate with aOld 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()MYSQL_STMTstructure begin with the prefixmysql_stmt_. -
Warning: Incompatible change!
The signature of the
mysql_stmt_prepare()function was changed toint mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length). To create aMYSQL_STMThandle, you should use themysql_stmt_init()function, notmysql_stmt_prepare(). -
SHOW GRANTSwith noFORclause or withFOR CURRENT_USER()shows the privileges for the current session. -
The improved character set support introduced in MySQL 4.1.0 for the
MyISAMandHEAPstorage engines is now available forInnoDBas well. -
A name of ``Primary'' no longer can be specified as an index name.
(That name is reserved for the
PRIMARY KEYif the table has one.) (Bug #856) -
MySQL now issues a warning when a
SETorENUMcolumn with duplicate values in the list is created. (Bug #1427) -
Now
SQL_SELECT_LIMITvariable has no influence on subqueries. (Bug #2600) -
UNHEX()function implemented. See section 12.3 String Functions. -
The
mysqlcommand-line client no longer stores in the history file multiple copies of identical queries that are run consecutively. -
Multi-line statements in the
mysqlcommand-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.
-
MyISAMtables now support keys up to 1000 bytes long. -
MyISAMandInnoDBtables 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_syntaxvariable now can be changed while the server is running. See section 5.2.3 Server System Variables. -
REVOKE ALL PRIVILEGES, GRANT FROM user_listis changed to a more consistentREVOKE 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'+0will 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.) UseCONV()to convert hexadecimal numbers to decimal. E.g.CONV(MID('0x10',3),16,10)+0. -
mysqlhotcopynow works on NetWare. -
ALTER TABLE DROP PRIMARY KEYno longer drops the firstUNIQUEindex if there is no primary index. (Bug #2361) -
Added
latin1_spanish_ci(Modern Spanish) collation for thelatin1character set. -
Added the
ENGINEtable option as a synonym for theTYPEoption forCREATE TABLEandALTER TABLE. -
Added the
--default-storage-engineserver option as a synonym for--default-table-type. -
Added the
storage_enginesystem variable as a synonym fortable_type. -
Warning: Incompatible change!
The
Typeoutput column forSHOW TABLE STATUSnow is labeledEngine. -
Added
init_connectandinit_slavesystem 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_USEDandSERVER_QUERY_NO_GOOD_INDEX_USEDflags are now set in theserver_statusfield of theMYSQLstructure. It is these flags that make the query to be logged as slow ifmysqldwas started with--log-slow-queries --log-queries-not-using-indexes. -
For replication of
MEMORY(HEAP) tables: Made the master automatically write aDELETE FROMstatement to its binary log when aMEMORYtable is opened for the first time since master's startup. This is for the case where the slave has replicated a non-emptyMEMORYtable, then the master is shut down and restarted: the table is now empty on master; theDELETE FROMempties 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 theinit-fileoption to populate theMEMORYtable 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 EXISTSinstead ofDROP TEMPORARY TABLE, for more robustness. -
The MySQL server now returns an error if
SET SQL_LOG_BINorSET SQL_LOG_UPDATEis issued by a user without theSUPERprivilege (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-binoption was used), then no transaction binary log cache is allocated for connections. This should savebinlog_cache_sizebytes of memory (32KB by default) for every connection. -
Added
Binlog_cache_useandBinlog_cache_disk_usestatus 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 thebinlog_cache_sizesystem 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-logtomysqlbinlog, for use in conjunction with--read-from-remote-server.
Bugs fixed:
-
Fixed check of
EXPLAINofUNION. (Bug #3639) -
Fixed a bug in a query that used
DISTINCTandORDER BYby column's real name, while the column had an alias, specified inSELECTclause. (Bug #3681) -
mysqldcould 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
WHEREwithPROCEDURE ANALYSE(). (Bug #2238). -
Fixed security problem in new authentication where password was not checked
for changed
GRANTaccounts untilFLUSH PRIVILEGESwas executed. (Bug #3404) -
Fixed crash of
GROUP_CONCAT()on expression withORDER BYand externalORDER BYin a query. (Bug #3752) -
Fixed a bug in
ALL/SOMEsubqueries in case of optimization (key field present in subquery). (Bug #3646) -
Fixed a bug in
SHOW GRANTSandEXPLAIN SELECTcharacter set conversion. (Bug #3403) -
Prepare statements parameter do not cause error message as fields used in
select list but not included in
ORDER BYlist. -
UNIONstatements did not consultSQL_SELECT_LIMITvalue when set. This is now fixed properly, which means that this limit is applied to the top level query, unlessLIMITfor entireUNIONis used. -
Fixed a bug in multiple-table
UPDATEstatements 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 updateMYSQL_FIELD->max_lengthwhen doingmysql_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
FROMclause 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
DELETEstatement in prepared statements. (Bug #3411) -
Requiring
UPDATEprivilege for tables which will not be updated in multiple-tableUPDATEstatement in prepared statements. -
Fixed prepared statement support for
INSERT,REPLACE,CREATE,DELETE,SELECT,DO,SETandSHOW. 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 f