Tabla de contenidos
- C.1. Cambios en la entrega 5.0.x (Desarrollo)
-
- C.1.1. Cambios en la entrega 5.0.11 (todavía no liberada)
- C.1.2. Cambios en la entrega 5.0.10 (todavía no liberada)
- C.1.3. Cambios en la entrega 5.0.9 (15 julio 2005)
- C.1.4. Cambios en la entrega 5.0.8 (not released)
- C.1.5. Cambios en la entrega 5.0.7 (10 June 2005)
- C.1.6. Cambios en la entrega 5.0.6 (26 May 2005)
- C.1.7. Cambios en la entrega 5.0.5 (not released)
- C.1.8. Cambios en la entrega 5.0.4 (16 Apr 2005)
- C.1.9. Cambios en la entrega 5.0.3 (23 Mar 2005: Beta)
- C.1.10. Cambios en la entrega 5.0.2 (01 Dec 2004)
- C.1.11. Cambios en la entrega 5.0.1 (27 Jul 2004)
- C.1.12. Cambios en la entrega 5.0.0 (22 Dec 2003: Alpha)
- C.2. Cambios en MyODBC
This appendix lists the changes in the MySQL source code for version 5.1.0 and later releases. For information about changes in previous versions of the MySQL database software, see the Manual de referencia de MySQL 4.1, which provides coverage of the 3.22, 3.23, 4.0, and 4.1 series of releases.
We are working actively on MySQL 5.0 and 5.1, and provide only critical bugfixes for MySQL 4.1, 4.0, and MySQL 3.23. We update this section as we add new features, so that everybody can follow the development.
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.
The following changelog shows what has been done in the 5.0 tree:
-
Basic support for read-only server side cursors.
-
Basic support for (updatable) views. See, for example, Sección 21.2, “Sintaxis de
CREATE VIEW”. -
Basic support for stored procedures (SQL:2003 style). See Capítulo 19, Procedimientos almacenados y funciones.
-
Initial support for rudimentary triggers.
-
Added
SELECT INTOlist_of_vars, which can be of mixed (that is, global and local) types. See Sección 19.2.9.3, “La sentenciaSELECT ... INTO”. -
Removed the update log. It is fully replaced by the binary log. If the MySQL server is started with
--log-update, it is translated to--log-bin(or ignored if the server is explicitly started with--log-bin), and a warning message is written to the error log. SettingSQL_LOG_UPDATEsilently setsSQL_LOG_BINinstead (or do nothing if the server is explicitly started with--log-bin). -
Support for the
ISAMstorage engine has been removed. If you haveISAMtables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
Support for
RAIDoptions inMyISAMtables has been removed. If you have tables that use these options, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
User variable names are now case insensitive: If you do
SET @a=10;thenSELECT @A;now returns10. Case sensitivity of a variable's value depends on the collation of the value. -
Strict mode, which in essence means that you get an error instead of a warning when inserting an incorrect value into a column. See Sección 5.3.2, “El modo SQL del servidor”.
-
VARCHARandVARBINARYcolumns remember end space. AVARCHAR()orVARBINARYcolumn can contain up to 65,535 characters or bytes, respectively. -
MEMORY(HEAP) tables can haveVARCHAR()columns. -
When using a constant string or a function that generate a string result in
CREATE ... SELECT, MySQL 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.
Functionality added or changed:
-
mysqldump now dumps triggers for each dumped table. This can be suppressed with the
--skip-triggersoption. (Bug #10431) -
Added new
ER_STACK_OVERRUN_NEED_MOREerror message to indicate that, while the stack is not completly full, more stack space is required. (Bug #11213) -
NDB: Improved handling of the configuration variablesNoOfPagesToDiskDuringRestartACC,NoOfPagesToDiskAfterRestartACC,NoOfPagesToDiskDuringRestartTUP, andNoOfPagesToDiskAfterRestartTUPshould result in noticeably faster startup times for MySQL Cluster. (Bug #12149) -
Added support of where clause for queries with
FROM DUAL. (Bug #11745)
Bugs fixed:
-
Multiple
SELECT SQL_CACHEqueries in a stored procedure causes error and client hang. (Bug #6897) -
Added checks to prevent error when allocating memory when there was insufficient memory available. (Bug #7003)
-
Character data truncated when GBK characters
0xA3A0and0xA1are present. (Bug #11987) -
Comparisons like
SELECT "A\\" LIKE "A\\";fail when usingSET NAMES utf8;. (Bug #11754) -
Corrected inaccurate error message when inserting out of range data under
TRADITIONALSQL mode. (Bug #11546) -
When used in a
SELECTquery against a view, theGROUP_CONCAT()function returned only a single row. (Bug #11412) -
Calling the C API function
mysql_stmt_fetch()after all rows of a result set were exhausted would return an error instead ofMYSQL_NO_DATA. (Bug #11037) -
Information about a trigger was not displayed in the output of
SELECT ... FROM INFORMATION_SCHEMA.TRIGGERSwhen the selected database wasINFORMATION_SCHEMA, prior to the trigger's first invocation. (Bug #12127) -
Issuing successive
FLUSH TABLES WITH READ LOCKwould cause themysqlclient to hang. (Bug #11934) -
In stored procedures, a cursor that fetched an empty string into a variable would set the variable to
NULLinstead. (Bug #8692) -
A trigger dependent on a feature of one
SQL_MODEsetting would cause an error when invoked after theSQL_MODEwas changed. (Bug #5891) -
A delayed insert that would duplicate an existing record crashed the server instead. (Bug #12226)
-
ALTER TABLEwhenSQL_MODE = 'TRADITIONAL'gave rise to an invalid error message. (Bug #11964) -
On AMD64, attempting to repair a
MyISAMtable with a full-text index would crash the server. (Bug #11684) -
The MySQL Cluster backup log was invalid where the number of Cluster nodes was not equal to a power of 2. (Bug #11675)
-
GROUP_CONCAT()sometimes returned a result with a different collation that that of its arguments. (Bug #10201) -
The
LPAD()andRPAD()functions returned the wrong length tomysql_fetch_fields(). (Bug #11311) -
A
UNIQUE VARCHARcolumn would be mis-identified asMULin table descriptions. (Bug #11227) -
Incorrect error message displayed if user attempted to create a table in a non-existing database using
CREATEdatabase_name.table_namesyntax. (Bug #10407) -
InnoDB: Do not flush after each write, not even before setting up the doublewrite buffer. Flushing can be extremely slow on some systems. (Bug #12125) -
InnoDB: TrueVARCHAR: ReturnNULLcolumns in the format expected by MySQL. (Bug #12186)
Functionality added or changed:
-
Security improvement: Applied a patch that addresses a
zlibdata vulnerability that could result in a buffer overflow and code execution. (CAN-2005-2096) (Bug #11844) -
The viewing of triggers and trigger metadata has been enhanced as follows:
-
An extension to the
SHOWcommand has been added:SHOW TRIGGERScan be used to view a listing of triggers. See Sección 13.5.4.20, “Sintaxis deSHOW TRIGGERS” for details. -
The
INFORMATION_SCHEMAdatabase now includes aTRIGGERStable. See Sección 22.1.16, “La tablaINFORMATION_SCHEMA TRIGGERS” for details. (Bug #9586)
-
-
Triggers can now reference tables by name. See Sección 20.1, “Sintaxis de
CREATE TRIGGER” for more information. -
The output of
perror --helpnow displays the--ndboption. (Bug #11999) -
On Windows, the search path used by MySQL applications for
my.ininow includes..\my.ini(that is, the application's parent directory, and hence, the installation directory). (Bug #10419) -
Added
mysql_get_character_set_info()C API function for obtaining information about the default character set of the current connection. -
The bundled version of the
readlinelibrary was upgraded to version 5.0. -
It is no longer necessary to issue an explicit
LOCK TABLESfor any tables accessed by a trigger prior to executing any statements that might invoke the trigger. (Bug #9581, Bug #8406) -
MySQL Cluster: A new-poption is available for use with the ndb_mgmd client. When called with this option, ndb_mgmd prints all configuration data tostdout, then exits. -
The namespace for triggers has changed. Previously, trigger names had to be unique per table. Now they must be unique within the schema (database). An implication of this change is that
DROP TRIGGERsyntax now uses a schema name instead of a table name (schema name is optional and, if omitted, the current schema will be used).Note: When upgrading from a previous version of MySQL 5 to MySQL 5.0.10 or newer, you must drop all triggers before upgrading and re-create them after or
DROP TRIGGERwill not work after the upgrade. (Bug #5892)
Bugs fixed:
-
NDB: Attempting to create or drop tables during a backup would cause the cluster to shut down. (Bug #11942) -
When attempting to drop a table with a broken unique index,
NDBfailed to drop the table and erroneously report that the table was unknown. (Bug #11355) -
SELECT ... NOT IN()gave unexpected results when only static value present between the(). (Bug #11885) -
Fixed compile error when using GCC4 on AMD64. (Bug #12040)
-
NDBignored theHostnameoption in theNDBD DEFAULTsection of the Cluster configuration file. (Bug #12028) -
SHOW PROCEDURE/FUNCTION STATUSdidn't work for users with limited access. (Bug #11577) -
MySQL server would crash is a fetch was performed after a
ROLLBACKwhen cursors were involved. (Bug #10760) -
The temporary tables created by an
ALTER TABLEon a cluster table were visible to all MySQL servers. (Bug #12055) -
NDB_MGMDwas leaking file descriptors. (Bug #11898) -
IP addresses not shown in
ndb_mgm SHOWcommand on second ndb_mgmd (or on ndb_mgmd restart). (Bug #11596) -
Functions that evaluate to constants (such as
NOW()andCURRENT_USER()were being evaluated in the definition of aVIEWrather than included verbatim. (Bug #4663) -
Execution of
SHOW TABLESfailed to increment theCom_show_tablesstatus variable. (Bug #11685) -
For execution of a stored procedure that refers to a view, changes to the view definition were not seen. The procedure continued to see the old contents of the view. (Bug #6120)
-
For prepared statements, the SQL parser did not disallow ‘
?’ parameter markers immediately adjacent to other tokens, which could result in malformed statements in the binary log. (For example,SELECT * FROM t WHERE? = 1could becomeSELECT * FROM t WHERE0 = 1.) (Bug #11299) -
When two threads compete for the same table, a deadlock could occur if one thread has also a lock on another table through
LOCK TABLESand the thread is attempting to remove the table in some manner and the other thread want locks on both tables. (Bug #10600) -
Aliasing the column names in a
VIEWdid not work when executing aSELECTquery on theVIEW. (Bug #11399) -
Performing an
ORDER BYon aSELECTfrom aVIEWproduced unexpected results whenVIEWand underlying table had the same column name on different columns. Bug #11709) -
The C API function
mysql_statement_reset()did not clear error information. (Bug #11183) -
When used within a subquery,
SUBSTRING()returned an empty string. (Bug #10269) -
Multiple-table
UPDATEqueries usingCONVERT_TZ()would fail with an error. (Bug #9979) -
mysql_fetch_fields()returned incorrect length information forMEDIUMandLONGTEXTandBLOBcolumns. (Bug #9735) -
mysqlbinlogwas failing the test suite on Windows due toBOOLbeing incorrectly cast toINT. (Bug #11567) -
NDBCLuster: Server left core files following shutdown if data nodes had failed. (Bug #11516) -
Creating a trigger in one database that references a table in another database was being allowed without generating errors. (Bug #8751)
-
Duplicate trigger names were allowed within a single schema. (Bug #6182)
-
Server did not accept some fully-qualified trigger names. (Bug #8758)
-
The
traditionalSQL mode accepted invalid dates if the date value provided was the result of an implicit type conversion. (Bug #5906) -
The MySQL server had issues with certain combinations of basedir and datadir. (Bug #7249)
-
INFORMATION_SCHEMA.COLUMNShad some inaccurate values for some data types. (Bug #11057) -
LIKE pattern matching using prefix index didn't return correct result. (Bug #11650)
-
For several character sets, MySQL incorrectly converted the character code for the division sign to the
eucjpmscharacter set. (Bug #11717) -
When invoked within a view,
SUBTIME()returned incorrect values. (Bug #11760) -
SHOW BINARY LOGSdisplayed a file size of 0 for all log files but the current one if the files were not located in the data directory. (Bug #12004) -
Server-side prepared statements failed for columns with a character set of
ucs2. (Bug #9442) -
References to system variables in an SQL statement prepared with
PREPAREwere evaluated duringEXECUTEto their values at prepare time, not to their values at execution time. (Bug #9359) -
For server shutdown on Windows, error messages of the form
Forcing close of threadnuser: 'name' were being written to the error log. Now connections are closed more gracefully without generating error messages. (Bug #7403) -
Increased the version number of the
libmysqlclientshared library from 14 to 15 because it is binary incompatible with the MySQL 4.1 client library. (Bug #11893) -
A recent optimizer change caused
DELETE … WHERE … NOT LIKEandDELETE … WHERE … NOT BETWEENto not properly identify the rows to be deleted. (Bug #11853) -
Within a stored procedure that selects from a table, invoking another procedure that requires a write lock for the table caused that procedure to fail with a message that the table was read-locked. (Bug #9565)
-
Within a stored procedure, selecting from a table through a view caused subsequent updates to the table to fail with a message that the table was read-locked. (Bug #9597)
-
For a stored procedure defined with
SQL SECURITY DEFINERcharacteristic,CURRENT_USER()incorrectly reported the use invoking the procedure, not the user who defined it. (Bug #7291) -
Creating a table with a
SETorENUMcolumn with theDEFAULT 0clause caused a server crash if the table's character set wasutf8. (Bug #11819) -
With strict SQL mode enabled,
ALTER TABLEreported spurious “Invalid default value” messages for columns that had noDEFAULTclause. (Bug #9881) -
In SQL prepared statements, comparisons could fail for values not equally space-padded. For example,
SELECT 'a' = 'a ';returns 1, butPREPARE s FROM 'SELECT ?=?'; SET @a = 'a', @b = 'a '; PREPARE s FROM 'SELECT ?=?'; EXECUTE s USING @a, @b;incorrectly returned 0. (Bug #9379) -
Labels in stored routines did not work if the character set was not
latin1. (Bug #7088) -
Invoking the
DES_ENCRYPT()function could cause a server crash if the server was started without the--des-key-fileoption. (Bug #11643) -
The server crashed upon execution of a statement that used a stored function indirectly (via a view) if the function was not yet in the connection-specific stored routine cache and the statement would update a
Handler_xxxstatus variable. This fix allows the use of stored routines underLOCK TABLESwithout explicitly locking themysql.locktable. However, you cannot usemysql.procin statements that will combine locking of it with modifications for other tables. (Bug #11554) -
The server crashed when dropping a trigger that invoked a stored procedure, if the procedure was not yet in the connection-specific stored routine cache. (Bug #11889)
-
Selecting the result of an aggregate function for an
ENUMorSETcolumn within a subquery could result in a server crash. (Bug #11821) -
Incorrect column values could be retrieved from views defined using statements of the form
SELECT * FROMtbl_name. (Bug #11771) -
The
mysql.proctable was not being created properly with the properutf8character set and collation, causing server crashes for stored procedure operations if the server was using a multi-byte character set. To take advantage of the bug fix, mysql_fix_privileges_tables should be run to correct the structure of themysql.proctable. (Bug #11365) -
Execution of a prepared statement that invoked a non-existent or dropped stored routine would crash the server. (Bug #11834)
-
Executing a statement that invoked a trigger would cause problems unless a
LOCK TABLESwas first issued for any tables accessed by the trigger. Note: The exact nature of the problem depended upon the MySQL 5.0 release being used: prior to 5.0.3, this resulted in a crash; from 5.0.3 to 5.0.7, MySQL would issue a warning; in 5.0.9, the server would issue an error. (Bug #8406)The same issue caused
LOCK TABLESto fail followingUNLOCK TABLESif triggers were involved. (Bug #9581) -
In a shared Windows environment, MySQL could not find its configuration file unless the file was in the
C:\directory. (Bug #5354)
Functionality added or changed:
-
An attempt to create a
TIMESTAMPcolumn with a display width (for example,TIMESTAMP(6)) now results in a warning. Display widths have not been supported forTIMESTAMPsince MySQL 4.1. (Bug #10466) -
InnoDB: When creating or extending an InnoDB data file, at most one megabyte at a time is allocated for initializing the file. Previously, InnoDB allocated and initialized 1 or 8 megabytes of memory, even if only a few 16-kilobyte pages were to be written. This improves the performance ofCREATE TABLEininnodb_file_per_tablemode. -
InnoDB: Various optimizations. Removed unreachable debug code from non-debug builds. Added hints for the branch predictor in gcc. Made assertions occupy less space. -
InnoDB: Makeinnodb_thread_concurrency=20by default. Bypass the concurrency checking if the setting is greater than or equal to 20. -
InnoDB: MakeCHECK TABLEkillable. (Bug #9730) -
Recursion in stored routines is now disabled because it was crashing the server. We plan to modify stored routines to allow this to operate safely in a future release. (Bug #11394)
-
The handling of
BITcolumns has been improved, and should now be much more reliable in a number of cases. (Bug #10617, Bug #11091, Bug #11572)
Bugs fixed:
-
SHOW CREATE VIEWdid not take theANSI MODEinto account when quoting identifiers. (Bug #6903) -
The
mysql_configscript did not handle symbolic linking properly. (Bug #10986) -
Incorrect results when using
GROUP BY ... WITH ROLLUPon aVIEW. (Bug #11639) -
Instances of the
VAR_SAMP()function in view definitions were converted toVARIANCE(). This is incorrect becauseVARIANCE()is the same asVAR_POP(), notVAR_SAMP(). (Bug #10651) -
mysqldump failed when reloading a view if the view was defined in terms of a different view that had not yet been reloaded. mysqldump now creates a dummy table to handle this case. (Bug #10927)
-
mysqldump could crash for illegal or nonexistent table names. (Bug #9358)
-
The
--no-dataoption for mysqldump was being ignored if table names were given after the database name. (Bug #9558) -
The
--master-dataoption for mysqldump resulted in no error if the binary log was not enabled. Now an error occurs unless the--forceoption is given. (Bug #11678) -
DES_ENCRYPT()andDES_DECRYPT()require SSL support to be enabled, but were not checking for it. Checking for incorrect arguments or resource exhaustion was also improved for these functions. (Bug #10589) -
When used in joins,
SUBSTRING()failed to truncate to zero any string values that could not be converted to numbers. (Bug #10124) -
mysqldump --xmldid not formatNULLcolumn values correctly. (Bug #9657) -
There was a compression algorithm issue with
myisampackfor very large datasets (where the total size of of all records in a single column was on the order of 3 GB or more) on 64-bit platforms. (A fix for other platforms was made in MySQL 5.0.6.) (Bug #8321) -
Temporary tables were created in the data directory instead of
tmpdir. (Bug #11440) -
MySQL would not compile correctly on QNX due to missing
rint()function. (Bug #11544) -
A
SELECT DISTINCTcol_namewould work correctly with aMyISAMtable only when there was an index oncol_name. (Bug #11484) -
The server would lose table-level
CREATE VIEWandSHOW VIEWprivileges following aFLUSH PRIVILEGESor server restart. (Bug #9795) -
In strict mode, an
INSERTinto a view that did not include a value for aNOT NULLcolumn but that did include aWHEREtest on the same column would succeed, This happened even though theINSERTshould have been prevented due to the failure to supply a value for theNOT NULLcolumn. (Bug #6443) -
Running a
CHECK TABLESon multiple views crashed the server. (Bug #11337) -
When a table had a primary key containing a
BLOBcolumn, creation of another index failed with the errorBLOB/TEXT column used in key specification without keylength, even when the new index did not contain aBLOBcolumn. (Bug #11657) -
NDB Cluster: When trying to open a table that could not be discovered or unpacked, cluster would return error codes which the MySQL server falsely interpreted as operating system errors. (Bug #103651)
-
Manually inserting a row with
host=''intomysql.tables_privand performing aFLUSH PRIVILEGESwould cause the server to crash. (Bug #11330) -
A cursor using a query with a filter on a
DATEorDATETIMEcolumn would cause the server to crash server after the data was fetched. (Bug #11172) -
Closing a cursor that was already closed would cause MySQL to hang. (Bug #9814)
-
Using
CONCAT_WSon a column setNOT NULLcaused incorrect results when used in aLEFT JOIN. (Bug #11469) -
Signed
BIGINTwould not accept-9223372036854775808as aDEFAULTvalue. (Bug #11215) -
Views did not use indexes on all appropriate queries. (Bug #10031)
-
For
MEMORYtables, it was possible for for updates to be performed using outdated key statistics when the updates involved only very small changes in a very few rows. This resulted in the random failures of queries such asUPDATE t SET col = col + 1 WHERE col_key = 2;where the same query with noWHEREclause would succeed. (Bug #10178) -
Optimizer performed range check when comparing unsigned integers to negative constants, could cause errors. (Bug #11185)
-
Wrong comparison method used in
VIEWwhen relaxed date syntax used (i.e.2005.06.10). (Bug #11325) -
The
ENCRYPT()andSUBSTRING_INDEX()functions would cause errors when used with aVIEW. (Bug #7024) -
Clients would hang following some errors with stored procedures. (Bug #9503)
-
Combining cursors and subselects could cause server crash or memory leaks. (Bug #10736)
-
If a prepared statement cursor is opened but not completely fetched, attempting to open a cursor for a second prepared statement will fail. (Bug #10794)
Note: Starting with version 5.0.8, changes for MySQL Cluster can be found in the combined Change History.
Functionality added or changed:
-
MEMORYtables now support indexes of up to 500 bytes. See Sección 14.3, “El motor de almacenamientoMEMORY(HEAP)”. (Bug #10566) -
New
SQL_MODE-NO_ENGINE_SUBSTITUTIONPrevents automatic substitution of storage engine when the requested storage engine is disabled or not compiled in. (Bug #6877) -
The statements
CREATE TABLE,TRUNCATE TABLE,DROP DATABASE, andCREATE DATABASEcause an implicit commit. (Bug #6883) -
Expanded on information provided in general log and slow query log for prepared statements. (Bug #8367, Bug #9334)
-
Where a
GROUP BYquery uses a grouping column from the query'sSELECTclause, MySQL now issues a warning. This is because the SQL standard states that any grouping column must unambiguously reference a column of the table resulting from the query'sFROMclause, and allowing columns from theSELECTclause to be used as grouping columns is a MySQL extension to the standard.By way of example, consider the following table:
CREATE TABLE users ( userid INT NOT NULL PRIMARY KEY, username VARCHAR(25), usergroupid INT NOT NULL );
MySQL allows you to use the alias in this query:
SELECT usergroupid AS id, COUNT(userid) AS number_of_users FROM users GROUP BY id;
However, the SQL standard requires that the column name be used, as shown here:
SELECT usergroupid AS id, COUNT(userid) AS number_of_users FROM users GROUP BY usergroupid;
Queries such as the first of the two shown above will continue to be supported in MySQL; however, beginning with MySQL 5.0.8, using a column alias in this fashion will generate a warning. Note that in the event of a collision between column names and/or aliases used in joins, MySQL attempts to resolve the conflict by giving preference to columns arising from tables named in the query's
FROMclause. (Bug #11211) -
The granting or revocation of privileges on a stored routine is no longer performed when running the server with
--skip-grant-tableseven after the statementSET @@global.automatic_sp_privileges=1;has been executed. (Bug #9993) -
Added support for
B'10'syntax for bit literal. (Bug #10650)
Bugs fixed:
-
Security fix: On Windows systems, a user with any of the following privileges
-
REFERENCES -
CREATE TEMPORARY TABLES -
GRANT OPTION -
CREATE -
SELECT
on
*.*could crashmysqldby issuing aUSE LPT1;orUSE PRN;command. In addition, any of the commandsUSE NUL;,USE CON;,USE COM1;, orUSE AUX;would report success even though the database was not in fact changed. Note: Although this bug was thought to be fixed previously, it was later discovered to be present in the MySQL 5.0.7-beta release for Windows. (Bug #9148, CAN-2005-0799 -
-
A
CREATE TABLEdb_name.tbl_nameLIKE ... statement would crash the server when no database was selected. (Bug #11028) -
SELECT DISTINCTqueries orGROUP BYqueries withoutMIN()orMAX()could return inconsistent results for indexed columns. (Bug #11044) -
The
SHOW INSTANCE OPTIONScommand in MySQL Instance Manager displayed option values incorrectly for options for which no value had been given. (Bug #11200) -
An outer join with an empty derived table (a result from a subquery) returned no result. (Bug #11284)
-
An outer join with an
ONcondition that evaluated to false could return an incorrect result. (Bug #11285) -
mysqld_safewould sometimes fail to remove the pid file for the oldmysqlprocess after a crash. As a result, the server would fail to start due to a falseA mysqld process already exists...error. (Bug #11122) -
CAST( ... AS DECIMAL) didn't work for strings. (Bug #11283) -
NULLIF()function could produce incorrect results if first argument isNULL. (Bug #11142) -
Setting
@@SQL_MODE = NULLcaused an erroneous error message. (Bug #10732) -
Converting a
VARCHARcolumn having an index to a different type (such asTINYTEXT) gave rise to an incorrect error message. (Bug #10543)Note that this bugfix induces a slight change in the behaviour of indexes: If an index is defined to be the same length as a field (or is left to default to that field's length), and the length of the field is later changed, then the index will adopt the new length of the field. Previously, the size of the index did not change for some field types (such as
VARCHAR) when the field type was changed. -
sql_data_accesscolumn ofroutinestable ofINFORMATION_SCHEMAwas empty. (Bug #11055) -
A
CAST()value could not be included in aVIEW. (Bug #11387) -
Server crashed when using
GROUP BYon the result of aDIVoperation on aDATETIMEvalue. (Bug #11385) -
Possible
NULLvalues inBLOBcolumns could crash the server when aBLOBwas used in aGROUP BYquery. (Bug #11295) -
Fixed 64 bit compiler warning for packet length in replication. (Bug #11064)
-
Multiple range accesses in a subquery cause server crash. (Bug #11487)
-
An issue with index merging could cause suboptimal index merge plans to be chosen when searching by indexes created on
DATEcolumns. The same issue caused the InnoDB storage engine to issue the warningusing a partial-field key prefix in search. (Bug #8441) -
The
mysqlhotcopyscript was not parsing the output ofSHOW SLAVE STATUScorrectly when called with the--record_log_posoption. (Bug #7967) -
SELECT * FROMtablereturned incorrect results when called from a stored procedure, wheretablehad a primary key. (Bug #10136) -
When used in defining a view, the
TIME_FORMAT()function failed with calculated values, for example, when passed the value returned bySEC_TO_TIME(). (Bug #7521) -
SELECT DISTINCT ... GROUP BYconstantreturned multiple rows (it should return a single row). (Bug #8614) -
INSERT INTO SELECT FROMviewproduced incorrect result when usingORDER BY. (Bug #11298) -
Fixed hang/crash with Boolean full-text search where a query contained more query terms that one-third of the query length (it could be achieved with truncation operator: 'a*b*c*d*'). (Bug #7858)
-
Fixed column name generation in
VIEWcreation to ensure there are no duplicate column names. (Bug #7448) -
An
ORDER BYclause sometimes had no effect on the ordering of a result when selecting specific columns (as opposed to usingSELECT *) from a view. (Bug #7422) -
Some data definition statements (
CREATE TABLEwhere the table was not a temporary table,TRUNCATE TABLE,DROP DATABASE, andCREATE DATABASE) were not being written to the binary log after aROLLBACK. This also caused problems with replication. (Bug #6883) -
Calling a stored procedure that made use of an
INSERT ... SELECT ... UNION SELECT ...query caused a server crash. (Bug #11060) -
Selecting from a view defined using
SELECT SUM(DISTINCT ...)caused an error; attempting to execute aSELECT * FROM INFORMATION_SCHEMA.TABLESquery after defining such a view crashed the server. (Bug #7015) -
The mysql client would output a prompt twice following input of very long strings, because it incorrectly assumed that a call to the _cgets() function would clear the input buffer. (Bug #10840)
-
A three byte buffer overflow in the client functions caused improper exiting of the client when reading a command from the user. (Bug #10841)
-
Fixed a problem where a stored procedure caused a server crash if the query cache was enabled. (Bug #9715)
-
SHOW CREATE DATABASE INFORMATION_SCHEMAreturned an “unknown database” error. (Bug #9434) -
Corrected a problem with
IFNULL()returning an incorrect result on 64-bit systems. (Bug #11235) -
Fixed a problem resolving table names with
lower_case_table_names=2when the table name lettercase differed in theFROMandWHEREclauses. (Bug #9500) -
Fixed server crash due to some internal functions not taking into account that for multi-byte character sets,
CHARcolumns could exceed 255 bytes andVARCHARcolumns could exceed 65,535 bytes. (Bug #11167) -
Fixed locking problems for multiple-statement
DELETEstatements performed within a stored routine, such as incorrectly locking a to-be-modified table with a read lock rather than a write lock. (Bug #11158) -
Fixed a portability problem testing for
crypt()support that caused compilation problems when using OpenSSL/yaSSL on HP-UX and Mac OS X. (Bug #10675, Bug #11150) -
The hostname cache was not working. (Bug #10931)
-
On Windows,
mysqlshowdid not interpret wildcard characters properly if they were given in the table name argument. (Bug #10947) -
Using
PREPAREto prepare a statement that invoked a stored routine that deallocated the prepared statement caused a server crash. This is prevented by disabling dynamic SQL within stored routines. (Bug #10975) -
Default hostname for MySQL server was always
mysql. (Bug #11174) -
Using
PREPAREto prepare a statement that invoked a stored routine that executed the prepared statement caused aPackets out of ordererror the second time the routine was invoked. This is prevented by disabling dynamic SQL within stored routines. (Bug #7115) -
Using prepared statements within a stored routine (
PREPARE,EXECUTE,DEALLOCATE) could cause the client connection to be dropped after the routine returned. This is prevented by disabling dynamic SQL within stored routines. (Bug #10605) -
When using a cursor with a prepared statement, the first execution returned the correct result but was not cleaned up properly, causing subsequent executions to return incorrect results. (Bug #10729)
-
MySQL Cluster: Connections between data nodes and management nodes were not being closed following shutdown of
ndb_mgmd. (Bug #11132) -
MySQL Cluster:
mysqldprocesses would not reconnect to cluster following restart ofndb_mgmd. (Bug #11221) -
MySQL Cluster: Fixed problem whereby data nodes would fail to restart on 64-bit Solaris (Bug #9025)
-
MySQL Cluster: Calling
ndb_select_count()crashed the cluster when running on Red Hat Enterprise 4/64-bit/Opteron. (Bug #10058) -
MySQL Cluster: Insert records were incorrectly applied by
ndb_restore, thus making restoration from backup inconsistent if the binlog contained inserts. (Bug #11166) -
MySQL Cluster: Cluster would time out and crash after first query on 64-bit Solaris 9. (Bug #8918)
-
MySQL Cluster:
ndb_mgmclientshowcommand displayed incorrect output after master data node failure. (Bug #11050) -
MySQL Cluster: A delete performed as part of a transaction caused an erroneous result. (Bug #11133)
-
MySQL Cluster: Not allowing sufficient parallelism in cluster configuration (e.g.
NoOfTransactionstoo small) causedndb_restoreto fail without providing any error messages. (Bug #10294) -
MySQL Cluster: When using dynamically allocated ports on Linux, cluster would hang on initial startup. (Bug #10893)
-
MySQL Cluster: Setting TransactionInactiveTimeout= 0 did not result in an infinite timeout. (Bug #11290)
-
InnoDB: Enforce maximumCHAR_LENGTH()of UTF-8 data inON UPDATE CASCADE. (Bug #10409) -
InnoDB: Pad UTF-8 variable-lengthCHARcolumns with0x20. Pad UCS2CHARcolumns with0x0020. (Bug #10511)
Functionality added or changed:
-
Added
mysql_set_character_set()C API function for setting the default character set of the current connection. This allows clients to affect the character set used bymysql_real_escape_string(). (Bug #8317) -
The behaviour of the
Last_query_costsystem variable has been changed. The default value is now 0 (rather than -1) and it now has session-level scope (rather than being global). See Sección 5.3.4, “Variables de estado del servidor” for additional information. -
All characters occuring on the same line following the
DELIMITERkeyword will be set as delimiter. For example,DELIMITER :;will set:;as the delimiter. This behavior is now consistent between MySQL 5.1 and MySQL 5.0. (Bug #9879) -
The
table,type, androwscolumns ofEXPLAINoutput can now beNULL. This is required for usingEXPLAINonSELECTqueries that use no tables (i.e.EXPLAIN SELECT 1). (Bug #9899) -
Placeholders now can be used for
LIMITin prepared statements. (Bug #7306) -
SHOW BINARY LOGSnow displays aFile_sizecolumn that indicates the size of each file. -
The
--delayed-insertoption for mysqldump has been disabled to avoid causing problems with storage engines that do not supportINSERT DELAYED. (Bug #7815) -
Improved the optimizer to be able to use indexes for expressions of the form
indexed_colNOT IN (val1,val2, ...) andindexed_colNOT BETWEENval1ANDval2.. (Bug #10561) -
Removed
mysqlshutdown.exeandmysqlwatch.exefrom the Windows “No Installer” distribution (they had already been removed from the “With Installer” distribution before). Removed those programs from the source distribution. -
Removed
WinMySQLAdminfrom the source distribution and from the “No Installer” Windows distribution (it had already been removed from the “With Installer” distribution before). -
InnoDB: In stored procedures and functions,InnoDBno longer takes full explicit table locks for every involved table. Only `intention' locks are taken, similar to those in the execution of an ordinary SQL statement. This greatly reduces the number of deadlocks.
Bugs fixed:
-
Security update: A user with limited privileges could obtain information about the privileges of other users by querying objects in the
INFORMATION_SCHEMAdatabase for which that user did not have the requisite privileges. (Bug #10964) -
Triggers with dropped functions caused crashes. (Bug #5893)
-
Failure of a
BEFOREtrigger did not prevent the triggering statement from performing its operation on the row for which the trigger error occurred. Now the triggering statement fails as described in Sección 20.3, “Utilización de disparadores”. (Bug #10902) -
Issuing a write lock for a table from one client prevented other clients from accessing the table's metadata. For example, if one client issued a
LOCK TABLESmydb.mytableWRITE, then a second client attempting to execute aUSEmydb; would hang. (Bug #9998) -
The
LAST_DAY()failed to returnNULLwhen supplied with an invalid argument. See Sección 12.5, “Funciones de fecha y hora”. (Bug #10568) -
The functions
COALESCE(),IF(), andIFNULL()performed incorrect conversions of their arguments. (Bug #9939) -
The
TIME_FORMAT()function returned incorrect results with some format specifiers. See Sección 12.5, “Funciones de fecha y hora”. (Bug #10590) -
Dropping stored routines when the MySQL server had been started with
--skip-grant-tablesgenerated extraneous warnings. (Bug #9993) -
A problem with the
my_global.hfile caused compilation of MySQL to fail on single-processor Linux systems running 2.6 kernels. (Bug #10364) -
The ucs2_turkish_ci collation failed with upper('i'). UPPER/LOWER now can return a string with different length. (Bug #8610)
-
OPTIMIZE of InnoDB table does not return 'Table is full' if out of tablespace. (Bug #8135)
-
GROUP BY queries with ROLLUP returned wrong results for expressions containing group by columns. (Bug #7894)
-
Fixed bug in
FIELD()function where value list containsNULL. (Bug #10944) -
Corrected a problem where an incorrect column type was returned in the result set metadata when using a prepared
SELECT DISTINCTstatement to select from a view. (Bug #11111) -
Fixed bug in the MySQL Instance manager that caused the version to always be
unknownwhenSHOW INSTANCE STATUSwas issued. (Bug #10229) -
Using
ORDER BYto sort the results of anIF()that contained aFROM_UNIXTIME()expression returned incorrect results due to integer overflow. (Bug #9669) -
Fixed a server crash resulting from accessing
InnoDBtables within stored functions. This is handled by prohibiting statements that do an explicit or explicit commit or rollback within stored functions or triggers. (Bug #10015) -
Fixed a server crash resulting from the second invocation of a stored procedure that selected from a view defined as a join that used
ONin the join conditions. (Bug #6866) -
Using
ALTER TABLEfor a table that had a trigger caused a crash when executing a statement that activated the trigger, and also a crash later withUSEdb_namefor the database containing the table. (Bug #5894) -
Fixed a server crash resulting from an attempt to allocate too much memory when
GROUP BYblob_colandCOUNT(DISTINCT)were used. (Bug #11088) -
Fixed a portability problem for compiling on Windows with Visual Studio 6. (Bug #11153)
-
The incorrect sequence of statements
HANDLERtbl_nameREADindex_nameNEXT without a precedingHANDLERtbl_nameREADindex_name= (value_list) for anInnoDBtable resulted in a server crash rather than an error. (Bug #5373) -
On Windows, with
lower_case_table_namesset to 2, usingALTER TABLEto alter aMEMORYorInnoDBtable that had a mixed-case name also improperly changed the name to lowercase. (Bug #9660) -
The server timed out SSL connections too quickly on Windows. (Bug #8572)
-
Executing
LOAD INDEX INTO CACHEfor a table while other threads where selecting from the table caused a deadlock. (Bug #10602) -
Fixed a server crash resulting from
CREATE TABLE ... SELECTthat selected from a table being altered byALTER TABLE. (Bug #10224) -
The
FEDERATEDstorage engine properly handled outer joins, but not inner joins. (Bug #10848) -
Consistently report
INFORMATION_SCHEMAtable names in uppercase inSHOW TABLE STATUSoutput. (Bug #10059) -
Fixed a failure of
WITH ROLLUPto sum values properly. (Bug #10982) -
Triggers were not being activated for multiple-table
UPDATEorDELETEstatements. (Bug #5860) -
INSERT BEFOREtriggers were not being activated forINSERT ... SELECTstatements. (Bug #6812) -
INSERT BEFOREtriggers were not being activated for implicit inserts (LOAD DATA). (Bug #8755) -
If a stored function contained a
FLUSHstatement, the function crashed when invoked.FLUSHnow is disallowed within stored functions. (Bug #8409) -
Multiple-row
REPLACEcould fail on a duplicate-key error when having oneAUTO_INCREMENTkey and one unique key. (Bug #11080) -
Fixed a server crash resulting from invalid string pointer when inserting into the
mysql.hosttable. (Bug #10181) -
Multiple-table
DELETEdid always delete on the fly from the first table that was to be deleted from. In some cases, when using many tables and it was necessary to access the same row twice in the first table, we could miss some rows-to-be-deleted from other tables. This is now fixed. -
The
mysql_next_result()function could hang if you were executing many statements in amysql_real_query()call and one of those statements raised an error. (Bug #9992) -
The combination of
COUNT(),DISTINCT, andCONCAT()sometimes triggered a memory deallocation bug on Windows resulting in a server crash. (Bug #9593) -
InnoDB: Do very fast shutdown only ifinnodb_fast_shutdown=2, but wait for threads to exit and release allocated memory ifinnodb_fast_shutdown=1. Starting with MySQL/InnoDB 5.0.5, InnoDB would do brutal shutdown also wheninnodb_fast_shutdown=1. (Bug #9673) -
InnoDB: FixedInnoDB: Error: stored_select_lock_type is 0 inside ::start_stmt()!in a stored procedure call ifinnodb_locks_unsafe_for_binlogwas set inmy.cnf. (Bug #10746) -
InnoDB: Fixed a duplicate key error that occurred withREPLACEin a table with anAUTO-INCcolumn. (Bug #11005) -
Fixed that MySQL would pass a wrong key length to storage engines in
MIN(). This could cause warningsInnoDB: Warning: using a partial-field key prefix in search.in the.errlog. (Bug #11039) -
Fixed a server crash for
INSERTorUPDATEwhen theWHEREclause contained a correlated subquery that referred to a column of the table being modified. (Bug #6384) -
Fixed a problem causing an incorrect result for columns that include an aggregate function as part of an expression when
WITH ROLLUPis added toGROUP BY. (Bug #7914) -
Fixed a problem with returning an incorrect result from a view that selected a
COALESCE()expression from the result of an outer join. (Bug #9938) -
MySQL was adding a
DEFAULTclause toENUMcolumns that included no explicitDEFAULTand were defined asNOT NULL. (This is supposed to happen only for columns that areNULL.) (Bug #6267) -
Corrected inappropriate error messages that were displayed when attempting to set the read-only
warning_countanderror_countsystem variables. (Bug #10339)
Functionality added or changed:
-
Incompatible change:
MyISAMandInnoDBtables created withDECIMALcolumns in MySQL 5.0.3 to 5.0.5 will appear corrupt after an upgrade to MySQL 5.0.6. Dump such tables with mysqldump before upgrading, and then reload them after upgrading. (The same incompatibility will occur for these tables created in MySQL 5.0.6 after a downgrade to MySQL 5.0.3 to 5.0.5.) (Bug #10465, Bug #10625) -
Added the
div_precision_incrementsystem variable, which indicates the number of digits of precision by which to increase the result of division operations performed with the/operator. -
Added the
log_bin_trust_routine_creatorssystem variable, which applies when binary logging is enabled. It controls whether stored routine creators can be trusted not to create stored routines that will cause unsafe events to be written to the binary log. -
Added the
--log-bin-trust-routine-creatorsserver option for setting thelog_bin_trust_routine_creatorssystem variable from the command line. -
Implemented the
STMT_ATTR_PREFETCH_ROWSoption for themysql_stmt_attr_set()C API function. This sets how many rows to fetch at a time when using cursors with prepared statements. -
The
GRANTandREVOKEstatements now support anobject_typeclause to be used for disambiguating whether the grant object is a table, a stored function, or a stored procedure. Use of this clause requires that you upgrade your grant tables. See Sección 2.10.2, “Aumentar la versión de las tablas de privilegios”. (Bug #10246) -
Added
REFERENCED_TABLE_SCHEMA,REFERENCED_TABLE_NAME, andREFERENCED_COLUMN_NAMEcolumns to theKEY_COLUMN_USAGEtable ofINFORMATION_SCHEMA. (Bug #9587) -
Added a
--show-warningsoption to mysql to cause warnings to be shown after each statement if there are any. This option applies to interactive and batch mode. In interactive mode,\wand\Wmay be used to enable and disable warning display. (Bug #8684) -
Removed a limitation that prevented use of FIFOs as logging targets (such as for the general query log). This modification does not apply to the binary log and the relay log. (Bug #8271)
-
Added a
--debugoption to my_print_defaults. -
When the server cannot read a table because it cannot read the
.frmfile, print a message that the table was created with a different version of MySQL. (This can happen if you create tables that use new features and then downgrade to an older version of MySQL.) (Bug #10435) -
SHOW VARIABLESnow shows theslave_compressed_protocol,slave_load_tmpdirandslave_skip_errorssystem variables. (Bug #7800) -
Removed unused system variable
myisam_max_extra_sort_file_size. -
Changed default value of
myisam_data_pointer_sizefrom 4 to 6. This allows us to avoidtable is fullerrors for most cases. -
The variable
concurrent_insertnow takes 3 values. Setting this to 2 changes MyISAM to do concurrent inserts to end of table if table is in use by another thread. -
New
/*>prompt for mysql. This prompt indicates that a/* ... */comment was begun on an earlier line and the closing*/sequence has not yet been seen. (Bug #9186) -
If strict SQL mode is enabled,
VARCHARandVARBINARYcolumns with a length greater than 65,535 no longer are silently converted toTEXTorBLOBcolumns. Instead, an error occurs. (Bug #8295, Bug #8296) -
The
INFORMATION_SCHEMA.SCHEMATAtable now has aDEFAULT_COLLATION_NAMEcolumn. (Bug #8998) -
InnoDB: When the maximum length ofSHOW INNODB STATUSoutput would be exceeded, truncate the beginning of the list of active transactions, instead of truncating the end of the output. (Bug #5436) -
InnoDB: Ifinnodb_locks_unsafe_for_binlogoption is set and the isolation level of the transaction is not set to serializable thenInnoDBuses a consistent read for select in clauses likeINSERT INTO ... SELECTandUPDATE ... (SELECT)that do not specifyFOR UPDATEorIN SHARE MODE. Thus no locks are set to rows read from selected table. -
Updated version of
libeditto 2.9. (Bug #2596) -
Removed
mysqlshutdown.exeandmysqlwatch.exefrom the Windows “With Installer” distribution.
Bugs fixed:
-
An error in the implementation of the
MyISAMcompression algorithm causedmyisampackto fail with very large sets of data (total size of all the records in a single column needed to be >= 3 GB in order to trigger this issue). (Bug #8321) -
Statements that create and use stored routines were not being written to the binary log, which affects replication and data recovery options. (Bug #2610) Stored routine-related statements now are logged, subject to the issues and limitations discussed in Sección 19.3, “Registro binario de procedimientos almacenados y disparadores”
-
Disabled binary logging within stored routines to avoid writing spurious extra statements to the binary log. For example, if a routine
p()executes anINSERTstatement, then forCALL p(), theCALLstatement appears in the binary log, but not theINSERTstatement. (Bug #9100) -
Statements that create and drop triggers were not being written to the binary log, which affects replication and data recovery options. (Bug #10417) Trigger-related statements now are logged, subject to the issues and limitations discussed in Sección 19.3, “Registro binario de procedimientos almacenados y disparadores”
-
The
mysql_stmt_execute()andmysql_stmt_reset()C API functions now close any cursor that is open for the statement, which prevents a server crash. (Bug #9478) -
The
mysql_stmt_attr_set()C API function now returns an error for option values that are defined inmysql.hbut not yet implemented, such asCURSOR_TYPE_SCROLLABLE. (Bug #9643) -
MERGEtables could fail on Windows due to incorrect interpretation of pathname separator characters for filenames in the.MRGfile. (Bug #10687) -
Fixed a server crash for
INSERT ... ON DUPLICATE KEY UPDATEwithMERGEtables, which do not have unique indexes. (Bug #10400) -
Fix
FORMAT()to do better rounding for double values (for example,FORMAT(4.55,1)returns4.6, not4.5). (Bug #9060) -
Disallow use of
SESSIONorGLOBALfor user variables or local variables in stored routines. (Bug #9286) -
Fixed a server crash when using
GROUP BY ... WITH ROLLUPon an indexed column in anInnoDBtable. (Bug #9798) -
In strict SQL mode, some assignments to numeric columns that should have been rejected were not (such as the result of an arithmetic expression or an explicit
CAST()operation). (Bug #6961) -
CREATE TABLE t AS SELECT UUID()created aVARCHAR(12)column, which is too small to hold the 36-character result fromUUID(). (Bug #9535) -
Fixed a server crash in the
BLACKHOLEstorage engine. (Bug #10175) -
Fixed a server crash resulting from repeated calls to
ABS()when the argument evaluated toNULL. (Bug #10599) -
For a user-defined function invoked from within a prepared statement, the UDF's initialization routine was invoked for each execution of the statement, but the deinitialization routine was not. (It was invoked only when the statement was closed.) Similarly, when invoking a UDF from within a trigger, the initialization routine was invoked but the deinitialization routine was not. For UDFs that have an expensive deinit function (such as
myperl, this bugfix will have negative performance consequences. (Bug #9913) -
Portability fix for Cygwin: Don't use
#pragma interfacein source files. (Bug #10241) -
Fix
CREATE TABLE ... LIKEto work whenlower_case_table_namesis set on a case-sensitive filesystem and the source table name is not given in lowercase. (Bug #9761) -
Fixed a server crash resulting from a
CHECK TABLEstatement where the arguments were a view name followed by a table name. (Bug #9897) -
Within a stored procedure, attempting to update a view defined as an inner join failed with a
Table 'tbl_name' was locked with a READ lock and can't be updated error. (Bug #9481) -
Fixed a problem with
INFORMATION_SCHEMAtables being inaccessible depending on lettercase used to refer to them. (Bug #10018) -
my_print_defaults was ignoring the
--defaults-extra-fileoption or crashing when the option was given. (Bug #9136, Bug #9851) -
The
INFORMATION_SCHEMA.COLUMNStable was missing columns of views for which the user has access. (Bug #9838) -
Fixed a mysqldump crash that occurred with the
--complete-insertoption when dumping tables with a large number of long column names. (Bug #10286) -
Corrected a problem where
DEFAULTvalues where not assigned properly toBIT(1)orCHAR(1)columns if certain other columns preceded them in the table definition. (Bug #10179) -
For
MERGEtables, avoid writing absolute pathnames in the.MRGfile for the names of the constituentMyISAMtables so that if the data directory is moved,MERGEtables will not break. For mysqld, write just theMyISAMtable name if it is in the same database as theMERGEtable, and a path relative to the data directory otherwise. For the embedded servers, absolute pathnames may still be used. (Bug #5964) -
Corrected a problem resolving outer column references in correlated subqueries when using the prepared statements. (Bug #10041)
-
Corrected the error message for exceeding the
MAX_CONNECTIONS_PER_HOURlimit to saymax_connections_per_hourinstead ofmax_connections. (Bug #9947) -
Fixed incorrect memory block allocation for the query cache in the embedded server. (Bug #9549)
-
Corrected an inability to select from a view within a stored procedure. (Bug #9758)
-
Fixed a server crash resulting from use of
AVG(DISTINCT)withGROUP BY ... WITH ROLLUP. (Bug #9799) -
Fixed a server crash resulting from use of
DISTINCT AVG()withGROUP BY ... WITH ROLLUP. (Bug #9800) -
Fixed a server crash resulting from use of a
CHARorVARCHARcolumn withMIN()orMAX()andGROUP BY ... WITH ROLLUP. (Bug #9820) -
Fixed a server crash resulting from use of
SELECT DISTINCTwith a prepared statement that uses a cursor. (Bug #9520) -
Fixed server crash resulting from multiple calls to a stored procedure that assigned the result of a subquery to a variable or compared it to a value with
IN. (Bug #5963) -
Selecting from a single-table view defined on multiple-table views caused a server crash. (Bug #8528)
-
If the file named by a
--defaults-extra-fileoption does not exist or is otherwise inaccessible, an error now occurs. (Bug #5056) -
net_read_timeoutandnet_write_timeoutwere not being respected on Windows. (Bug #9721) -
SELECTfromINFORMATION_SCHEMAtables failed if the statement has aGROUP BYclause and an aggregate function in the select list. (Bug #9404) -
Corrected some failures of prepared statements for SQL (
PREPAREplusEXECUTE) to return all rows for someSELECTstatements. (Bug #9096, Bug #9777) -
Remove extra slashes in
--tmpdirvalue (for example, convert/var//tmpto/var/tmp, because they caused various errors. (Bug #8497) -
Added
Create_routine_priv,Alter_routine_priv, andExecute_privprivileges to themysql.hostprivilege table. (They had been added tomysql.dbin MySQL 5.0.3 but not to thehosttable.) (Bug #8166) -
Fixed configure to properly recognize whether NTPL is available on Linux. (Bug #2173)
-
Incomplete results were returned from
INFORMATION_SCHEMA.COLUMNSforINFORMATION_SCHEMAtables for non-rootusers. (Bug #10261) -
Fixed a portability problem in compiling
mysql.ccwith VC++ on Windows. (Bug #10245) -
SELECT 0/0returned0rather thanNULL. (Bug #10404) -
MAX()for anINT UNSIGNED(unsigned 4-byte integer) column could return negative values if the column contained values larger than 2^31. (Bug #9298) -
SHOW CREATE VIEWgot confused and could not find the view if there was a temporary table with the same name as the view. (Bug #8921) -
Fixed a deadlock resulting from use of
FLUSH TABLES WITH READ LOCKwhile anINSERT DELAYEDstatement is in progress. (Bug #7823) -
The optimizer was choosing suboptimal execution plans for certain outer joins where the right table of a left join (or left table of a right join) had both
ONandWHEREconditions. (Bug #10162) -
RENAME TABLEfor anARCHIVEtable failed if the.arnfile was not present. (Bug #9911) -
Invoking a stored function that executed a
SHOWstatement resulted in a server crash. (Bug #8408) -
Fixed problems with static variables and do not link with
libsupc++to allow building on FreeBSD 5.3. (Bug #9714) -
Fixed some awk script portability problems in cmd-line-utils/libedit/makelist.sh. (Bug #9954)
-
Fixed a problem with mishandling of
NULLkey parts in hash indexes onVARCHARcolumns, resulting in incorrect query results. (Bug #9489, Bug #10176) -
InnoDB: Fixed a critical bug in InnoDBAUTO_INCREMENT: it could assign the same value for several rows. (Bug #10359)InnoDB: All InnoDB bug fixes from 4.1.12 and earlier versions, and also the fixes to bugs #10335 and #10607 listed in the 4.1.13 change notes.
No public release of MySQL 5.0.5 was made. The changes described in this section are available in MySQL 5.0.6.
Functionality added or changed:
-
Added support for the
BITdata type to theMEMORY,InnoDB, andBDBstorage engines. -
SHOW VARIABLESno longer displays the deprecatedlog_updatesystem variable. (Bug #9738) -
The behavior controlled by the
--innodb-fast-shutdownoption now can be changed at runtime by setting the value of the globalinnodb_fast_shutdownsystem variable. It now accepts values 0, 1 and 2 (except on Netware where 2 is disabled). If set to 2, then when the MySQL server shuts down,InnoDBwill just flush its logs and shut down brutally (and quickly) as if a MySQL crash had occurred; no committed transaction will be lost, but a crash recovery will be done at next startup.
Bugs fixed:
-
Security fix: If mysqld was started with
--user=non_existent_user, it would run using the privileges of the account it was invoked from, even if that wasroot. (Bug #9833) -
Corrected a failure to resolve a column reference correctly for a
LEFT JOINthat compared a join column to anINsubquery. (Bug #9338) -
Fixed a problem where, after an internal temporary table in memory became too large and had to be converted to an on-disk table, the error indicator was not cleared and the query failed with error 1023 (
Can't find record in ''). (Bug #9703) -
Multiple-table updates could produce spurious data-truncation warnings if they used a join across columns that are indexed using a column prefix. (Bug #9103)
-
Fixed a string-length comparison problem that caused mysql to fail loading dump files containing certain '
\'-sequences. (Bug #9756) -
Fixed a failure to resolve a column reference properly when an outer join involving a view contained a subquery and the column was used in the subquery and the outer query. (Bug #6106, Bug #6107)
-
Use of a subquery that used
WITH ROLLUPin theFROMclause of the main query sometimes resulted in aColumn cannot be nullerror. (Bug #9681) -
Fixed a memory leak that occurred when selecting from a view that contained a subquery. (Bug #10107)
-
Fixed an optimizer bug in computing the union of two ranges for the
ORoperator. (Bug #9348) -
Fixed a segmentation fault in mysqlcheck that occurred when the last table checked in
--auto-repairmode returned an error (such as the table being aMERGEtable). (Bug #9492) -
SET @var= CAST(NULL AS [INTEGER|CHAR])now sets the result type of the variable toINTEGER/CHAR. (Bug #6598) -
Incorrect results were returned for queries of the form
SELECT ... LEFT JOIN ... WHERE EXISTS (subquery), where the subquery selected rows based on anIS NULLcondition. (Bug #9516) -
Executing
LOCK TABLESand then calling a stored procedure caused an error and resulting in the server thinking that no stored procedures exist. (Bug #9566) -
Selecting from a view containing a subquery caused the server to hang. (Bug #8490)
-
Within a stored procedure, attempting to execute a multiple-table
UPDATEfailed with aTable 'tbl_name' was locked with a READ lock and can't be updated error. (Bug #9486) -
Starting mysqld with the
--skip-innodband--default-storage-engine=innodb(or--default-table-type=innodbcaused a server crash. (Bug #9815) -
Queries containing
CURRENT_USER()incorrectly were registered in the query cache. (Bug #9796) -
Setting the
storage_enginesystem variable toMEMORYsucceeded, but retrieving the variable resulted in a value ofHEAP(the old name for theMEMORYstorage engine) rather thanMEMORY. (Bug #10039) -
mysqlshow displayed an incorrect row count for tables. (Bug #9391)
-
The server died with signal 11 if a non-existent location was specified for the location of the binary log. Now the server exits after printing an appropriate error messsage. (Bug #9542)
-
Fixed a problem in the client/server protocol where the server closed the connection before sending the final error message. The problem could show up as a
Lost connection to MySQL server during querywhen attempting to connect to access a non-existent database. (Bug #6387, Bug #9455) -
Fixed a
readline-related crash in mysql when the user pressed Control-R. (Bug #9568) -
For stored functions that should return a
YEARvalue, corrected a failure of the value to be inYEARformat. (Bug #8861) -
Fixed a server crash resulting from invocation of a stored function that returned a value having an
ENUMorSETdata type. (Bug #9775) -
Fixed a server crash resulting from invocation of a stored function that returned a value having a
BLOBdata type. (Bug #9102) -
Fixed a server crash resulting from invocation of a stored function that returned a value having a
BITdata type. (Bug #7648) -
TIMEDIFF()with a negative time first argument and postive time second argument produced incorrect results. (Bug #8068) -
Fixed a problem with
OPTIMIZE TABLEforInnoDBtables being written twice to the binary log. (Bug #9149) -
InnoDB: PreventALTER TABLEfrom changing the storage engine if there are foreign key constraints on the table. (Bug #5574, Bug #5670) -
InnoDB: Fixed a bug where next-key locking doesn't allow the insert which does not produce a phantom. (Bug #9354) If the range is of type'a' <= uniquecolumn,InnoDBlock only the RECORD, if the record with the column value'a'exists in a CLUSTERED index. This allows inserts before a range. -
InnoDB: WhenFOREIGN_KEY_CHECKS=0,ALTER TABLEandRENAME TABLEwill ignore any type incompatibilities between referencing and referenced columns. Thus, it will be possible to convert the character sets of columns that participate in a foreign key. Be sure to convert all tables before modifying any data! (Bug #9802) -
Provide more informative error messages in clustered setting when a query is issued against a table that has been modified by another
mysqldserver. (Bug #6762)
Functionality added or changed:
-
Added
ENGINE=MyISAMtable option when creatingmysql.proctable in mysql_create_system_tables script to make sure the table is created as aMyISAMtable even if the default storage engine has been changed. (Bug #9496) -
SHOW CREATE TABLEfor anINFORMATION_SCHEMAtable no longer prints aMAX_ROWSvalue because the value has no meaning. (Bug #8941) -
Invalid
DEFAULTvalues forCREATE TABLEnow generate errors. (Bug #5902) -
Added
--show-table-typeoption to mysqlshow, to display a column indicating the table type, as inSHOW FULL TABLES. (Bug #5036) -
The way the time zone information is stored into the binary log was changed, so that it's now possible to have a replication master and slave running with different global time zones. A drawback is that replication from 5.0.4 masters to pre-5.0.4 slaves is impossible.
-
Added
--with-big-tablescompilation option to configure. (Previously it was necessary to pass-DBIG_TABLESto the compiler manually in order to enable large table support.) See Sección 2.8.2, “Opciones típicas de configure” for details. -
New configuration directives
!includeand!includedirimplemented for including option files and searching directories for option files. See Sección 4.3.2, “Usar ficheros de opciones” for usage.
Bugs fixed:
-
The use of
XORtogether withNOT ISNULL()erroneously resulted in some outer joins being converted to inner joins by the optimizer. (Bug #9017) -
Fixed an optimizer problem where extraneous comparisons between
NULLvalues in indexed columns were being done for operators such as=that are never true forNULL. (Bug #8877) -
Fixed the client/server protocol for prepared statements so that reconnection works properly when the connection is killed while reconnect is enabled. (Bug #8866)
-
A server installed as a Windows service and started with
--shared-memorycould not be stopped. (Bug #9665) -
Fixed a server crash resulting from multiple executions of a prepared statement involving a join of an
INFORMATION_SCHEMAtable with another table. (Bug #9383) -
Fixed
utf8_spanish2_cianducs2_spanish2_cicollations to not consider 'r' equal to 'rr'. If you upgrade to this version from an earlier version, you should rebuild the indexes of affected tables. (Bug #9269) -
mysqldump dumped core when invoked with
--tmpand--single-transactionoptions and a non-existent table name. (Bug #9175) -
Allow extra HKSCS and cp950 characters (
big5extension characters) to be accepted inbig5columns. (Bug #9357) -
mysql.server no longer uses non-portable alias command or LSB functions. (Bug #9852)
-
Fixed a server crash resulting from
GROUP BYon a decimal expression. (Bug #9210) -
In prepared statements, subqueries containing parameters were erroneously treated as
consttables during preparation, resulting in a server crash. (Bug #8807) -
InnoDB:
ENUMandSETcolumns were treated incorrectly as character strings. This bug did not manifest itself withlatin1collations if there were less than about 100 elements in anENUM, but it caused malfunction withUTF-8. Old tables will continue to work. In new tables,ENUMandSETwill be internally stored as unsigned integers. (Bug #9526) -
InnoDB: Avoid test suite failures caused by a locking conflict between two server instances at server shutdown/startup. This conflict on advisory locks appears to be the result of a bug in the operating system; these locks should be released when the files are closed, but somehow that does not always happen immediately in Linux. (Bug #9381)
-
InnoDB: True
VARCHAR: InnoDB stored the 'position' of a row wrong in a column prefix primary key index; this could cause MySQL to complainERROR 1032: Can't find record …in an update of the primary key, and also someORDER BYorDISTINCTqueries. (Bug #9314) -
InnoDB: Fix bug in MySQL/InnoDB 5.0.3: SQL statements were not rolled back on error. (Bug #8650)
-
Fixed a
Commands out of syncerror when two prepared statements for single-row result sets were open simultaneously. (Bug #8880) -
Fixed a server crash after a call to
mysql_stmt_close()for single-row result set. (Bug #9159) -
Fixed server crashes for
CREATE TABLE ... SELECTorINSERT INTO ... SELECTwhen selecting from multiple-table view. (Bug #8703, Bug #9398) -
TRADITIONALSQL mode should prevent inserts where a column with no default value is omitted or set to a value ofDEFAULT. Fixed cases where this restriction was not enforced. (Bug #5986) -
Fixed a server crash when creating a
PRIMARY KEYfor a table, if the table contained aBITcolumn. (Bug #9571) -
Warning message from
GROUP_CONCAT()did not always indicate correct number of lines. (Bug #8681) -
The commit count cache for
NDBwas not properly invalidated when deleting a record using a cursor. (Bug #8585) -
Fixed option-parsing code for the embedded server to understand
K,M, andGsuffixes for thenet_buffer_lengthandmax_allowed_packetoptions. (Bug #9472) -
Selecting a
BITcolumn failed if the binary client/server protocol was used. (Bug #9608) -
Fixed a permissions problem whereby information in
INFORMATION_SCHEMAcould be exposed to a user with insufficient privileges. (Bug #7214) -
An error now occurs if you try to insert an invalid value via a stored procedure in
STRICTmode. (Bug #5907) -
Link with
libsupc++on Fedora Core 3 to get language support functions. (Bug #6554) -
The value of the
CHARACTER_MAXIMUM_LENGTHandCHARACTER_OCTET_LENGTHcolumns of theINFORMATION_SCHEMA.COLUMNStable must beNULLfor numeric columns, but were not. (Bug #9344) -
DROP TABLEdid not drop triggers that were defined for the table.DROP DATABASEdid not drop triggers in the database. (Bug #5859, Bug #6559) -
CREATE OR REPLACE VIEWandALTER VIEWnow require theCREATE VIEWandDROPprivileges, notCREATE VIEWandDELETE. (DELETEis a row-level privilege, not a table-level privilege.) (Bug #9260) -
Some user variables were not being handled with “implicit” coercibility. (Bug #9425)
-
Setting the
max_error_countsystem variable to 0 resulted in a setting of 1. (Bug #9072) -
Fixed a collation coercibility problem that caused a union between binary and non-binary columns to fail. (Bug #6519)
-
Fixed a bug in division of floating point numbers. It could cause nine zeroes (
000000000) to be inserted in the middle of the quotient. (Bug #9501) -
INFORMATION_SCHEMAtables had an implicit upper limit for the number of rows. As a result, not all data could be returned for some queries. (Bug #9317) -
Fixed a problem with the
teecommand in mysql that resulted in mysql crashing. (Bug #8499) -
CAST()now produces warnings when casting incorrectINTEGERandCHARvalues. This also applies to implicitstringtonumbercasts. (Bug #5912) -
ALTER TABLEnow fails inSTRICTmode if the alteration generates warnings. -
Using
CONVERT('0000-00-00',date)orCAST('0000-00-00' as date)inTRADITIONALSQL mode now produces a warning. (Bug #6145) -
Inserting a zero date in a
DATE,DATETIMEorTIMESTAMPcolumn duringTRADITIONALmode now produces an error. (Bug #5933) -
Inserting a zero date into a
DATETIMEcolumn inTRADITIONALmode now produces an error. -
STR_TO_DATE()now produces errors in strict mode (and warnings otherwise) when given an illegal argument. (Bug #5902) -
Fixed a problem with
ORDER BYthat sometimes caused incorrect sorting ofutf8data. (Bug #9309) -
Fixed server crash resulting from queries that combined
SELECT DISTINCT,SUM(), andROLLUP. (Bug #8615) -
Incorrect results were returned from queries that combined
SELECT DISTINCT,GROUP BY, andROLLUP. (Bug #8616) -
Too many rows were returned from queries that combined
ROLLUPandLIMITifSQL_CALC_FOUND_ROWSwas given. (Bug #8617) -
If on replication master a
LOAD DATA INFILEis interrupted in the middle (integrity constraint violation, killed connection...), the slave used to skip thisLOAD DATA INFILEentirely, thus missing some changes if this command permanently inserted/updated some table records before being interrupted. This is now fixed. (Bug #3247)
Note: This Beta release, as any other pre-production release, should not be installed on “production” level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has done its best to ensure a high level of quality, protect your data by making a backup as you would for any software beta release.
Functionality added or changed:
-
New privilege
CREATE USERwas added. -
Security improvement: The server creates
.frm,.MYD,.MYI,.MRG,.ISD, and.ISMtable files only if a file with the same name does not already exist. Thanks to Stefano Di Paola<[email protected]>for finding and informing us about this issue. (CAN-2005-0711) -
Security improvement: User-defined functions should have at least one symbol defined in addition to the
xxxsymbol that corresponds to the mainxxx()function. These auxiliary symbols correspond to thexxx_init(),xxx_deinit(),xxx_reset(),xxx_clear(), andxxx_add()functions. mysqld by default no longer loads UDFs unless they have at least one auxiliary symbol defined in addition to the main symbol. The--allow-suspicious-udfsoption controls whether UDFs that have only anxxxsymbol can be loaded. By default, the option is off.mysqldalso checks UDF filenames when it reads them from themysql.functable and rejects those that contain directory pathname separator characters. (It already checked names as given inCREATE FUNCTIONstatements.) See Sección 27.2.3.1, “Secuencias de llamada UDF para funciones simples”, Sección 27.2.3.2, “Secuencias de llamada UDF para funciones agregadas”, and Sección 27.2.3.6, “Precauciones de seguridad en funciones definidas por usuarios”. Thanks to Stefano Di Paola<[email protected]>for finding and informing us about this issue. (CAN-2005-0709, CAN-2005-0710) -
my.cnfin the compile-time datadir (usually/usr/local/mysql/data/in the binary tarball distributions) is not being read anymore. The value of the environment variableMYSQL_HOMEis used instead of the hard-coded path. -
Support for the
ISAMstorage engine has been removed. If you haveISAMtables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
Support for
RAIDoptions inMyISAMtables has been removed. If you have tables that use these options, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
Added support for
AVG(DISTINCT). -
ONLY_FULL_GROUP_BYno longer is included in theANSIcomposite SQL mode. (Bug #8510) -
mysqld_safe will create the directory where the UNIX socket file is to be located if the directory does not exist. This applies only to the last component of the directory pathname. (Bug #8513)
-
The coercibility for the return value of functions such as
USER()orVERSION()now is “system constant” rather than “implicit.” This makes these functions more coercible than column values so that comparisons of the two do not result inIllegal mix of collationserrors.COERCIBILITY()was modified to accommodate this new coercibility value. See Sección 12.9.3, “Funciones de información”. -
User variable coercibility has been changed from “coercible” to “implicit.” That is, user variables have the same coercibility as column values.
-
Boolean full-text phrase searching now requires only that matches contain exactly the same words as the phrase and in the same order. Non-word characters no longer need match exactly.
-
CHECKSUM TABLEreturns a warning for non-existing tables. The checksum value remainsNULLas before. (Bug #8256) -
The server now includes a timestamp in the
Ready for connectionsmessage that is written to the error log at startup. (Bug #8444) -
Added
SQL_NOTESsession variable to causeNote-level warnings not to be recorded. (Bug #6662) -
Allowed the service-installation command for Windows servers to specify a single option other than
--defaults-filefollowing the service name. This is for compatibility with MySQL 4.1. (Bug #7856) -
InnoDB: Upgrading from 4.1: The sorting order for end-space in
TEXTcolumns for InnoDB tables has changed. Starting from 5.0.3, InnoDB comparesTEXTcolumns as space-padded at the end. If you have a non-unique index on aTEXTcolumn, you should runCHECK TABLEon it, and runOPTIMIZE TABLEif the check reports errors. If you have aUNIQUE INDEXon aTEXTcolumn, you should rebuild the table withOPTIMIZE TABLE. -
InnoDB: Commit after every 10,000 copied rows when executingALTER TABLE,CREATE INDEX,DROP INDEXorOPTIMIZE TABLE. This makes it much faster to recover from an aborted operation. -
Added
VAR_POP()andSTDDEV_POP()as standard SQL aliases for theVARIANCE()andSTDDEV()functions that compute population variance and standard deviation. Added newVAR_SAMP()andSTDDEV_SAMP()functions to compute sample variance and standard deviation. (Bug #3190) -
Fixed a problem with out-of-order packets being sent (
ERRORafterOKorEOF) following aKILL QUERYstatement. (Bug #6804) -
Retrieving from a view defined as a
SELECTthat mixedUNION ALLandUNION DISTINCTresulted in a different result than retrieving from the originalSELECT. (Bug #6565) -
Fixed a problem with non-optimal
index_mergequery execution plans being chosen on IRIX. (Bug #8578) -
BITin column definitions now is a distinct data type; it no longer is treated as a synonym forTINYINT(1). -
Bit-field values can be written using
b'value' notation.valueis a binary value written using 0s and 1s. -
From the Windows distribution, predefined accounts without passwords for remote users ("root@%", "@%") were removed (other distributions never had them).
-
Added
mysql_library_init()andmysql_library_end()as synonyms for themysql_server_init()andmysql_server_end()C API functions.mysql_library_init()andmysql_library_end()are#definesymbols, but the names more clearly indicate that they should be called when beginning and ending use of a MySQL C API library no matter whether the application useslibmysqlclientorlibmysqld. (Bug #6149) -
SHOW COLUMNSnow displaysNOrather than blank in theNulloutput column if the corresponding table column cannot beNULL. -
Changed XML format for mysql from
<col_name>col_value</col_name> to<field name="col_name">col_value</field> to allow for proper encoding of column names that are not legal as element names. (Bug #7811) -
Added
--innodb-checksumsand--innodb-doublewriteoptions for mysqld. -
Added
--large-pagesoption for mysqld. -
Added
multi_read_rangesystem variable. -
SHOW DATABASES,SHOW TABLES,SHOW COLUMNS, and so forth display information about theINFORMATION_SCHEMAdatabase. Also, severalSHOWstatements now accept aWHEREclause specifying which output rows to display. See Capítulo 22, La base de datos de informaciónINFORMATION_SCHEMA. -
Added the
CREATE ROUTINEandALTER ROUTINEprivileges, and made theEXECUTEprivilege operational. -
InnoDB: Corrected a bug in the crash recovery of
ROW_FORMAT=COMPACTtables that caused corruption. (Bug #7973) There may still be bugs in the crash recovery, especially inCOMPACTtables. -
When the
MyISAMstorage engine detects corruption of aMyISAMtable, a message describing the problem now is written to the error log. -
InnoDB: When MySQL/InnoDB is compiled on Mac OS X 10.2 or earlier, detect the operating system version at run time and use the
fcntl()file flush method on Mac OS X versions 10.3 and later. In Mac OS X,fsync()does not flush the write cache in the disk drive, but the specialfcntl()does; however, the flush request is ignored by some external devices. Failure to flush the buffers may cause severe database corruption at power outages. -
InnoDB: Implemented fast
TRUNCATE TABLE. The old approach (deleting rows one by one) may be used if the table is being referenced by foreign keys. (Bug #7150) -
Added
cp932(SJIS for Windows Japanese) andeucjpms(UJIS for Windows Japanese) character sets. -
Added several
InnoDBstatus variables. See Sección 5.3.4, “Variables de estado del servidor”. -
Added the
FEDERATEDstorage engine. See Sección 14.6, “El motor de almacenamientoFEDERATED”. -
SHOW CREATE TABLEnow usesUSINGindex_typerather thanTYPEindex_typeto specify an index type. (Bug #7233) -
InnoDB now supports a fast
TRUNCATE TABLE. One visible change from this is that auto-increment values for this table are reset onTRUNCATE. -
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 explicitly set this flag to 0 or 1 aftermysql_real_connect()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. -
MEMORY(HEAP) can haveVARCHAR()fields. -
VARCHARcolumns now remember end space. AVARCHAR()column can now contain up to 65535 bytes. For more details, see Sección C.1, “Cambios en la entrega 5.0.x (Desarrollo)”. If the table handler doesn't support the newVARCHARtype, then it's converted to aCHARcolumn. Currently this happens forNDBtables. -
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. The new format typically saves 20 % of disk space and memory. -
InnoDB: Setting the initial
AUTO_INCREMENTvalue for anInnoDBtable usingCREATE TABLE ... AUTO_INCREMENT =nnow works, andALTER TABLE ... AUTO_INCREMENT =nresets the current value. -
Seconds_Behind_MasterisNULL(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 is zero if the SQL thread has caught up to the 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 Sección A.4.3, “Cómo se comporta MySQL ante un disco lleno”. -
The MySQL server now aborts 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 providing a name for the binary log index file, a warning is issued because MySQL falls back to using the hostname for that name, and this is prone to replication issues if the server's hostname's gets changed later. See Sección A.8.4, “Cuestiones abiertas en MySQL”. -
Added account-specific
MAX_USER_CONNECTIONSlimit, which allows you to specify the maximum number of concurrent connections for the account. Also, all limited resources now are counted per account (instead of being counted per user + host pair as it was before). Use the--old-style-user-limitsoption to get the old behavior. -
InnoDB: A shared record lock (
LOCK_REC_NOT_GAP) is now taken for a matching record in the foreign key check because inserts can be allowed into gaps. -
InnoDB: Relaxed locking in
INSERT…SELECT, single tableUPDATE…SELECTand single tableDELETE…SELECTclauses wheninnodb_locks_unsafe_for_binlogis used and isolation level of the transaction is not serializable.InnoDBuses consistent read in these cases for a selected table. -
Added a new global system variable
slave_transaction_retries: if the replication slave SQL thread fails to execute a transaction because of anInnoDBdeadlock or exceeded InnoDB'sinnodb_lock_wait_timeoutor NDBCluster'sTransactionDeadlockDetectionTimeoutorTransactionInactiveTimeout, it automatically retriesslave_transaction_retriestimes before stopping with an error. The default is 10. (Bug #8325) -
When a client releases a user-level lock,
DO RELEASE_LOCK()will not be written to the binary log anymore (this makes the binary log smaller); as a counterpart, the slave does not actually take the lock when it executesGET_LOCK(). This is mainly an optimization and should not affect existing setups. (Bug #7998) -
The way the character set information is stored into the binary log was changed, so that it's now possible to have a replication master and slave running with different global character sets. A drawback is that replication from 5.0.3 masters to pre-5.0.3 slaves is impossible.
-
The
LOAD DATAstatement was extended to support user variables in the target column list, and an optionalSETclause. Now one can perform some transformations on data after they have been read and before they are inserted into the table. For example:LOAD DATA INFILE 'file.txt' INTO TABLE t1 (column1, @var1) SET column2 = @var1/100;
Also, replication of
LOAD DATAwas changed, so you can't replicate such statements from a 5.0.3 master to pre-5.0.3 slaves.
Bugs fixed:
-
If a
MyISAMtable on Windows hadINDEX DIRECTORYorDATA DIRECTORYtable options, mysqldump dumped the directory pathnames with single-backslash pathname separators. This would cause syntax errors when importing the dump file. mysqldump now changes '\' to '/' in the pathnames on Windows. (Bug #6660) -
mysql_fix_privilege_tablesnow fixes that themysqlprivilege tables can be used in MySQL 4.1. This allows one to easily downgrade to 4.1 or run MySQL 5.0 and 4.1 with the same privilege files for testing purposes. -
Fixed bug creating user with GRANT fails with password but works without, (Bug #7905)
-
mysqldump misinterpreted '
_' and '%' characters in the names of tables to be dumped as wildcard characters. (Bug #9123) -
The definition of the enumeration-valued
sql_modecolumn of themysql.proctable was missing some of the current allowable SQL modes, so stored routines would not necessarily execute with the SQL mode in effect at the time of routine definition. (Bug #8902) -
REPAIR TABLEdid not invalidate query results in the query cache that were generated from the table. (Bug #8480) -
In strict or traditional SQL mode, too-long string values assigned to string columns (
CHAR,VARCHAR,BINARY,VARBINARY,TEXT, orBLOB) were correctly truncated, but the server returned an SQLSTATE value of01000(should be22001). (Bug #6999, Bug #9029) -
Stored functions that used cursors could return incorrect results. (Bug #8386)
-
AES_DECRYPT(col_name,key) could fail to returnNULLfor invalid values incol_name, ifcol_namewas declared asNOT NULL. (Bug #8669) -
Ordering by unsigned expression (more complex than a column reference) was treating the value as signed, producing incorrectly sorted results. (Bug #7425)
-
HAVINGwas treating unsigned columns as signed. (Bug #7425) -
Fixed a problem with boolean full-text searches on
utf8columns where a double quote in the search string caused a server crash. (Bug #8351) -
For a query with both
GROUP BYandCOUNT(DISTINCT)clauses and aFROMclause with a subquery,NULLwas returned for anyVARCHARcolumn selected by the subquery. (Bug #8218) -
Fixed a bug in
TRUNCATE, which did not work within stored procedures. A workaround has been made so that within stored procedures,TRUNCATEis executed likeDELETE. This was necessary becauseTRUNCATEis implicitly locking tables. (Bug #8850) -
Fixed an optimizer bug that caused incorrectly ordered result from a query that used a
FULLTEXTindex to retrieve rows and there was another index that was usable forORDER BY. For such a query,EXPLAINshowedfulltextjoin type, but regular (notFULLTEXT) index in theKeycolumn. (Bug #6635) -
If
SELECT DISTINCTnamed an index column multiple times in the select list, the server tried to access different key fields for each instance of the column, which could result in a crash. (Bug #8532) -
For a stored function that refers to a given table, invoking the function while selecting from the same table resulted in a server crash. (Bug #8405)
-
Comparison of a
DECIMALcolumn containingNULLto a subquery that producedDECIMALvalues resulted in a server crash. (Bug #8397) -
The
--set-character-setoption for myisamchk was changed to--set-collation. The value needed for specifying how to sort indexes is a collation name, not a character set name. (Bug #8349) -
Hostname matching didn't work if a netmask was specified for table-specific privileges. (Bug #3309)
-
Corruption of
MyISAMtable indexes could occur withTRUNCATE TABLEif the table had already been opened. For example, this was possible if the table had been opened implicitly by selecting from aMERGEtable that mapped to theMyISAMtable. The server now issues an error message forTRUNCATE TABLEunder these conditions. (Bug #8306) -
Setting the connection collation to a value different from the server collation followed by a
CREATE TABLEstatement that included a quoted default value resulted in a server crash. (Bug #8235) -
Fixed handling of table-name matching in mysqlhotcopy to accommodate
DBD::mysql2.9003 and up (which implement identifier quoting). (Bug #8136) -
Selecting from a view defined as a join caused a server crash if the query cache was enabled. (Bug #8054)
-
Results in the query cache generated from a view were not properly invalidated after
ALTER VIEWorDROP VIEWon that view. (Bug #8050) -
FOUND_ROWS()returned an incorrect value after aSELECT SQL_CALC_FOUND_ROWS DISTINCTstatement that selected constants and includedGROUP BYandLIMITclauses. (Bug #7945) -
Selecting from an
INFORMATION_SCHEMAtable combined with a subselect on anINFORMATION_SCHEMAtable caused an error with the messageTabletbl_nameis corrupted. (Bug #8164) -
Fixed a problem with equality propagation optimization for prepared statements and stored procedures that caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug #8115, Bug #8849)
-
LEFT OUTER JOINbetween an empty base table and a view on an empty base table caused a server crash. (Bug #7433) -
Use of
GROUP_CONCAT()in the select list when selecting from a view caused a server crash. (Bug #7116) -
Use of a view in a correlated subquery that contains
HAVINGbut noGROUP BYcaused a server crash. (Bug #6894) -
Handling by
mysql_list_fields()of references to stored functions within views was incorrect and could result in a server crash. (Bug #6814) -
mysqldump now avoids writing
SET NAMESto the dump output if the server is older than version 4.1 and would not understand that statement. (Bug #7997) -
Fixed problems when selecting from a view that had an
EXISTSorNOT EXISTSsubquery. Selecting columns by name caused a server crash. WithSELECT *, a crash did not occur, but columns in outer query were not resolved properly. (Bug #6394) -
DDL statements for views were not being written to the binary log (and thus not subject to replication). (Bug #4838)
-
The
CHAR()function was not ignoringNULLarguments, contrary to the documentation. (Bug #6317) -
Creating a table using a name containing a character that is illegal in
character_set_clientresulted in the character being stripped from the name and no error. The character now is considered an error. (Bug #8041) -
Fixed a problem with the Cyrillic letters I and SHORT I being treated the same by the
utf8_general_cicollation. (Bug #8385) -
Some
INFORMATION_SCHEMAcolumns that contained catalog identifiers were of typeLONGTEXT. These were changed toVARCHAR(N, whereNis the appropriate maximum identifier length. (Bug #7215) -
Some
INFORMATION_SCHEMAcolumns that contained timestamp values were of typeVARBINARY. These were changed toTIMESTAMP. (Bug #7217) -
An expression that tested a case-insensitive character column against string constants that differed in lettercase could fail because the constants were treated as having a binary collation. (For example,
WHERE city='London' AND city='london'could fail.) (Bug #7098, Bug #8690) -
The output of the
STATUS(\s) command in mysql had the values for the server and client character sets reversed. (Bug #7571) -
If the slave was running with
--replicate-*-tableoptions which excluded one temporary table and included another, and the two tables were used in a singleDROP TEMPORARY TABLE IF EXISTSstatement, as the ones the master automatically writes to its binary log upon client's disconnection when client has not explicitly dropped these, the slave could forget to delete the included replicated temporary table. Only the slave needs to be upgraded. (Bug #8055) -
When setting integer system variables to a negative value with
SET VARIABLES, the value was treated as a positive value modulo 2^32. (Bug #6958) -
Corrected a problem with references to
DUALwhere statements such asSELECT 1 AS a FROM DUALwould succeed but statements such asSELECT 1 AS a FROM DUAL LIMIT 1would fail. (Bug #8023) -
Fixed a server crash caused by
DELETE FROMtbl_name... WHERE ... ORDER BYtbl_name.col_namewhen theORDER BYcolumn was qualified with the table name. (Bug #8392) -
Fixed a bug in
MATCH ... AGAINSTin natural language mode that could cause a server crash if theFULLTEXTindex was not used in a join (EXPLAINdid not showfulltextjoin mode) and the search query matched no rows in the table (Bug #8522). -
InnoDB: Honor the--tmpdirstartup option when creating temporary files. Previously,InnoDBtemporary files were always created in the temporary directory of the operating system. On Netware,InnoDBwill continue to ignore--tmpdir. (Bug #5822) -
Platform and architecture information in version information produced for
--versionoption on Windows was alwaysWin95/Win98 (i32). More accurately determine platform asWin32orWin64for 32-bit or 64-bit Windows, and architecture asia32for x86,ia64for Itanium, andaxpfor Alpha. (Bug #4445) -
If multiple semicolon-separated statements were received in a single packet, they were written to the binary log as a single event rather than as separate per-statement events. For a server serving as a replication master, this caused replication to fail when the event was sent to slave servers. (Bug #8436)
-
Fixed
LOAD INDEXstatement to actually load index in memory. (Bug #8452) -
Fixed a failure of multiple-table updates to replicate properly on slave servers when
--replicate-*-tableoptions had been specified. (Bug #7011) -
Fixed failure of
CREATE TABLE ... LIKEWindows when the source or destination table was located in a symlinked database directory. (Bug #6607) -
With
lower_case_table_namesset to 1, mysqldump on Windows could write the same table name in different lettercase for different SQL statements. Fixed so that consistent lettercase is used. (Bug #5185) -
mysqld_safe now understands the
--helpoption. Previously, it ignored the option and attempted to start the server anyway. (Bug #7931) -
Fixed problem in
NO_BACKSLASH_ESCAPESSQL mode for strings that contained both the string quoting character and backslash. (Bug #6368) -
Fixed some portability issues with overflow in floating point values.
-
Prepared statements now gives warnings on prepare.
-
Fixed bug in prepared statements with
SUM(DISTINCT...). -
Fixed bug in prepared statements with
OUTER JOIN. -
Fixed a bug in
CONV()function returning unsignedBIGINTnumber (third argument is positive, and return value does not fit in 32 bits). (Bug #7751) -
Fixed a failure of the
IN()operator to return correct result if all values in the list were constants and some of them were using substring functions, for example,LEFT(),RIGHT(), orMID(). (Bug #7716) -
Fixed a crash in
CONVERT_TZ()function when its second or third argument was from aconsttable (see Sección 7.2.1, “Sintaxis deEXPLAIN(Obtener información acerca de unSELECT)”). (Bug #7705) -
Fixed a problem with calculation of number of columns in row comparison against subquery. (Bug #8020)
-
Fixed erroneous output resulting from
SELECT DISTINCTcombined with a subquery andGROUP BY. (Bug #7946) -
Fixed server crash in comparing a nested row expression (for example
row(1,(2,3))) with a subquery. (Bug #8022) -
Fixed server crash resulting from certain correlated subqueries with forward references (references to an alias defined later in the outer query). (Bug #8025)
-
Fixed server crash resulting from re-execution of prepared statements containing subqueries. (Bug #8125)
-
Fixed a bug where
ALTER TABLEimproperly would accept an index on aTIMESTAMPcolumn thatCREATE TABLEwould reject. (Bug #7884) -
SHOW CREATE TABLEnow reportsENGINE=MEMORYrather thanENGINE=HEAPfor aMEMORYtable (unless theMYSQL323SQL mode is enabled). (Bug #6659) -
Fixed a bug where the use of
GROUP_CONCAT()withHAVINGcaused a server crash. (Bug #7769) -
Fixed a bug where comparing the result of a subquery to a non-existent column caused a server crash on Windows. (Bug #7885)
-
Fixed a bug in a combination of
-notandtrunc*operators of full-text search. Using more than one truncated negative search term, was causing empty result set. -
InnoDB: Corrected the handling of trailing spaces in the
ucs2character set. (Bug #7350, Bug #8771) -
InnoDB: Use native
tmpfile()function on Netware. All InnoDB temporary files are created undersys:\tmp. Previously, InnoDB temporary files were never deleted on Netware. -
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 mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CAN-2005-0004)
-
Fixed a bug that caused server crash if some error occured during filling of temporary table created for derived table or view handling. (Bug #7413)
-
Fixed a bug which caused server crash if query containing
CONVERT_TZ()function with constant arguments was prepared. (Bug #6849) -
Prevent adding
CREATE TABLE .. 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 mysqld a
SIGHUPcaused 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) -
mysqlbinlog did not print
SET 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 made mysqldump --single-transaction sometimes 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) -
mysqlbinlog forgot to add backquotes around the collation of user variables (causing later parsing problems as
BINARYis a reserved word). (Bug #7793) -
Ensured that mysqldump --single-transaction sets its transaction isolation level to
REPEATABLE READbefore proceeding (otherwise if the MySQL server was configured to run with a default isolation level lower thanREPEATABLE READit could give an inconsistent dump). (Bug #7850) -
Fixed that when using the
RPAD()function (or any function adding spaces to the right) in a query that had to be resolved by using a temporary table, all resulting strings had rightmost spaces removed (i.e.RPAD()did not work) (Bug #4048) -
Fixed that a 5.0.3 slave can connect to a master < 3.23.50 without hanging (the reason for the hang is a bug in these quite old masters --
SELECT @@unknown_varhangs them -- which was fixed in MySQL 3.23.50). (Bug #7965) -
InnoDB: Fixed a deadlock without any locking, simple select and update (Bug #7975).
InnoDBnow takes an exclusive lock whenINSERT ON DUPLICATE KEY UPDATEis checking duplicate keys. -
Fixed a bug where MySQL was allowing concurrent updates (inserts, deletes) to a table if binary logging is enabled. Changed to ensure that all updates are executed in a serialized fashion, because they are executed serialized when binlog is replayed. (Bug #7879)
-
Fixed a rare race condition which could lead to
FLUSH TABLES WITH READ LOCKhanging. (Bug #8682) -
Fixed a bug that caused the slave to stop on statements that produced an error on the master. (Bug #8412)
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. -
SHOW STATUSnow shows the thread specific status variables andSHOW GLOBAL STATUSshows the status variables for the whole server. -
Added support for the
INFORMATION_SCHEMA“information database” that provides database metadata. See Capítulo 22, La base de datos de informaciónINFORMATION_SCHEMA. -
A
HAVINGclause in aSELECTstatement now can refer to columns in theGROUP BYclause, as required by standard SQL. -
Added the
CREATE USERandRENAME USERstatements. -
Modify
DROP USERso that it drops the account, including all its privileges. Formerly, it removed the account record only for an account that had had all privileges revoked. -
Added
IS [NOT]boolean_valuesyntax, whereboolean_valueisTRUE,FALSE, orUNKNOWN. -
Added several
InnoDBstatus variables. See Sección 5.3.4, “Variables de estado del servidor”. -
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-data is now able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See Sección 8.7, “El programa de copia de seguridad de base de datos mysqldump”.
-
Added
--start-datetime,--stop-datetime,--start-position,--stop-positionoptions to mysqlbinlog (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 checks dates and in strict mode allows only fully correct dates. If you want MySQL to behave as before, 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 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_tables script now initializes the global
CREATE 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_binloginmy.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 now displays "Rolling back" in the
Statecolumn ofSHOW PROCESSLIST. -
mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, etc) before each
LOAD DATA INFILE, like it does for other queries; unless--short-formis used. -
Two new server system variables were introduced.
auto_increment_incrementandauto_increment_offsetcan be set locally or globally, and are intended for use in controlling the behaviour ofAUTO_INCREMENTcolumns in master-to-master replication. Note that these variables are not intended to take the place of sequences. See Sección 5.3.3, “Variables de sistema del servidor”.
Bugs fixed:
-
Fixed that mysqlbinlog --read-from-remote-server sometimes couldn't accept two binary logfiles on the command line. (Bug #4507)
-
Fixed that mysqlbinlog --position --read-from-remote-server had incorrect
# 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-run failed on the
rpl_trunc_binlogtest if running test from the installed (the target of 'make install') directory. (Bug #5050) -
Fixed that mysql-test-run failed on the
grant_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 later redoes 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) -
Fixed a bug which prevented mysqlbinlog from being able to read from
stdin, for example, when piping the output from zcat to mysqlbinlog. (Bug #7853)
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:
-
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 Sección 24.3.3.56, “mysql_shutdown()”. -
When installing a MySQL server as a Windows service, the installation command can include a
--local-serviceoption following the service name to cause the server to run using theLocalServiceWindows account that has limited privileges. This is in addition to the--defaults-fileoption that also can be given following the service name. -
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 Sección 2.10.2, “Aumentar la versión de las tablas de privilegios”.
-
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. -
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
USEdb_nameis in effect. -
Explicit
USEdb_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 to mysqlbinlog, 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 Sección 5.10.3, “El registro binario (Binary Log)”. -
OPTIMIZE TABLEforInnoDBtables is now mapped toALTER TABLEinstead ofANALYZE TABLE. This rebuilds the table, which updates index statistics and frees space in the clustered index. -
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 mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See Sección 6.7, “Características de la replicación y problemas conocidos”.
-
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 Sección 13.5.5.3, “Sintaxis deKILL”.
Bugs fixed:
-
Strange results with index (x, y) ...
WHERE x=val_1AND y>=val_2ORDER BYpk; (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 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 of mysqlbinlog now requires an argument. -
Fixed a segmentation fault when running
LOAD DATA FROM MASTERafterRESET SLAVE. (Bug #2922) -
mysqlbinlog --read-from-remote-server read all binary logs following the one that was requested. It now stops at the end of the requested file, the same as it does when reading a local binary log. There is an option
--to-last-logto get the old behavior. (Bug #3204) -
Fixed mysqlbinlog --read-from-remote-server to print the exact positions of events in the "at #" lines. (Bug #3214)
-
Fixed a rare error condition that caused the slave SQL thread spuriously to print the message
Binlog has bad magic numberand stop when it was not necessary to do so. (Bug #3401) -
Fixed mysqlbinlog not to forget to print a
USEstatement 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_tables didn't correctly handle the argument of its
--password=#option. (Bug #4240) -
Fixed potential memory overrun in
mysql_real_connect()(which required a compromised DNS server and certain operating systems). (Bug #4017, CAN-2004-0836) -
During the installation process of the server RPM on Linux, mysqld was run as the
rootsystem user, and if you had--log-bin=somewhere_out_of_var_lib_mysqlit created binary log files owned byrootin this directory, which remained owned byrootafter the installation. This is now fixed by starting mysqld as 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) -
mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug #3875)
-
Fixed incorrect destruction of expression that led to a server crash on complex
AND/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)
Functionality added or changed:
-
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. -
Added support for
SUM(DISTINCT),MIN(DISTINCT), andMAX(DISTINCT). -
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 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 Sección 7.2.6, “Index Merge Optimization”. -
Basic support for stored procedures (SQL:2003 style). See Capítulo 19, Procedimientos almacenados y funciones.
-
Added
SELECT INTOlist_of_vars, which can be of mixed (that is, global and local) types. See Sección 19.2.9.3, “La sentenciaSELECT ... INTO”. -
Easier replication upgrade (5.0.0 masters can read older binary logs and 5.0.0 slaves can read older relay logs). See Sección 6.5, “Compatibilidad entre versiones de MySQL con respecto a la replicación” for more details). The format of the binary log and relay log is changed compared to that of MySQL 4.1 and older.
Bugs fixed: