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 INTO
list_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_UPDATE
silently setsSQL_LOG_BIN
instead (or do nothing if the server is explicitly started with--log-bin
). -
Support for the
ISAM
storage engine has been removed. If you haveISAM
tables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
Support for
RAID
options inMyISAM
tables 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”.
-
VARCHAR
andVARBINARY
columns remember end space. AVARCHAR()
orVARBINARY
column 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-triggers
option. (Bug #10431) -
Added new
ER_STACK_OVERRUN_NEED_MORE
error 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
, andNoOfPagesToDiskAfterRestartTUP
should 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_CACHE
queries 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
0xA3A0
and0xA1
are 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
TRADITIONAL
SQL mode. (Bug #11546) -
When used in a
SELECT
query 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.TRIGGERS
when the selected database wasINFORMATION_SCHEMA
, prior to the trigger's first invocation. (Bug #12127) -
Issuing successive
FLUSH TABLES WITH READ LOCK
would cause themysql
client to hang. (Bug #11934) -
In stored procedures, a cursor that fetched an empty string into a variable would set the variable to
NULL
instead. (Bug #8692) -
A trigger dependent on a feature of one
SQL_MODE
setting would cause an error when invoked after theSQL_MODE
was changed. (Bug #5891) -
A delayed insert that would duplicate an existing record crashed the server instead. (Bug #12226)
-
ALTER TABLE
whenSQL_MODE = 'TRADITIONAL'
gave rise to an invalid error message. (Bug #11964) -
On AMD64, attempting to repair a
MyISAM
table 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 VARCHAR
column would be mis-identified asMUL
in table descriptions. (Bug #11227) -
Incorrect error message displayed if user attempted to create a table in a non-existing database using
CREATE
database_name
.table_name
syntax. (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
: ReturnNULL
columns in the format expected by MySQL. (Bug #12186)
Functionality added or changed:
-
Security improvement: Applied a patch that addresses a
zlib
data 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
SHOW
command has been added:SHOW TRIGGERS
can be used to view a listing of triggers. See Sección 13.5.4.20, “Sintaxis deSHOW TRIGGERS
” for details. -
The
INFORMATION_SCHEMA
database now includes aTRIGGERS
table. 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 --help
now displays the--ndb
option. (Bug #11999) -
On Windows, the search path used by MySQL applications for
my.ini
now 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
readline
library was upgraded to version 5.0. -
It is no longer necessary to issue an explicit
LOCK TABLES
for any tables accessed by a trigger prior to executing any statements that might invoke the trigger. (Bug #9581, Bug #8406) -
MySQL Cluster
: A new-p
option 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 TRIGGER
syntax 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 TRIGGER
will 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,
NDB
failed 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)
-
NDB
ignored theHostname
option in theNDBD DEFAULT
section of the Cluster configuration file. (Bug #12028) -
SHOW PROCEDURE/FUNCTION STATUS
didn't work for users with limited access. (Bug #11577) -
MySQL server would crash is a fetch was performed after a
ROLLBACK
when cursors were involved. (Bug #10760) -
The temporary tables created by an
ALTER TABLE
on a cluster table were visible to all MySQL servers. (Bug #12055) -
NDB_MGMD
was leaking file descriptors. (Bug #11898) -
IP addresses not shown in
ndb_mgm SHOW
command 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 aVIEW
rather than included verbatim. (Bug #4663) -
Execution of
SHOW TABLES
failed to increment theCom_show_tables
status 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? = 1
could 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 TABLES
and 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
VIEW
did not work when executing aSELECT
query on theVIEW
. (Bug #11399) -
Performing an
ORDER BY
on aSELECT
from aVIEW
produced unexpected results whenVIEW
and 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
UPDATE
queries usingCONVERT_TZ()
would fail with an error. (Bug #9979) -
mysql_fetch_fields()
returned incorrect length information forMEDIUM
andLONG
TEXT
andBLOB
columns. (Bug #9735) -
mysqlbinlog
was failing the test suite on Windows due toBOOL
being 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
traditional
SQL 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.COLUMNS
had 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
eucjpms
character set. (Bug #11717) -
When invoked within a view,
SUBTIME()
returned incorrect values. (Bug #11760) -
SHOW BINARY LOGS
displayed 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
PREPARE
were evaluated duringEXECUTE
to 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 thread
n
user: '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
libmysqlclient
shared 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 LIKE
andDELETE … WHERE … NOT BETWEEN
to 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 DEFINER
characteristic,CURRENT_USER()
incorrectly reported the use invoking the procedure, not the user who defined it. (Bug #7291) -
Creating a table with a
SET
orENUM
column with theDEFAULT 0
clause caused a server crash if the table's character set wasutf8
. (Bug #11819) -
With strict SQL mode enabled,
ALTER TABLE
reported spurious “Invalid default value” messages for columns that had noDEFAULT
clause. (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-file
option. (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_
xxx
status variable. This fix allows the use of stored routines underLOCK TABLES
without explicitly locking themysql.lock
table. However, you cannot usemysql.proc
in 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
ENUM
orSET
column 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 * FROM
tbl_name
. (Bug #11771) -
The
mysql.proc
table was not being created properly with the properutf8
character 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.proc
table. (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 TABLES
was 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 TABLES
to fail followingUNLOCK TABLES
if 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
TIMESTAMP
column with a display width (for example,TIMESTAMP(6)
) now results in a warning. Display widths have not been supported forTIMESTAMP
since 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 TABLE
ininnodb_file_per_table
mode. -
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=20
by default. Bypass the concurrency checking if the setting is greater than or equal to 20. -
InnoDB
: MakeCHECK TABLE
killable. (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
BIT
columns 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 VIEW
did not take theANSI MODE
into account when quoting identifiers. (Bug #6903) -
The
mysql_config
script did not handle symbolic linking properly. (Bug #10986) -
Incorrect results when using
GROUP BY ... WITH ROLLUP
on 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-data
option for mysqldump was being ignored if table names were given after the database name. (Bug #9558) -
The
--master-data
option for mysqldump resulted in no error if the binary log was not enabled. Now an error occurs unless the--force
option 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 --xml
did not formatNULL
column values correctly. (Bug #9657) -
There was a compression algorithm issue with
myisampack
for 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 DISTINCT
col_name
would work correctly with aMyISAM
table only when there was an index oncol_name
. (Bug #11484) -
The server would lose table-level
CREATE VIEW
andSHOW VIEW
privileges following aFLUSH PRIVILEGES
or server restart. (Bug #9795) -
In strict mode, an
INSERT
into a view that did not include a value for aNOT NULL
column but that did include aWHERE
test on the same column would succeed, This happened even though theINSERT
should have been prevented due to the failure to supply a value for theNOT NULL
column. (Bug #6443) -
Running a
CHECK TABLES
on multiple views crashed the server. (Bug #11337) -
When a table had a primary key containing a
BLOB
column, creation of another index failed with the errorBLOB/TEXT column used in key specification without keylength
, even when the new index did not contain aBLOB
column. (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_priv
and performing aFLUSH PRIVILEGES
would cause the server to crash. (Bug #11330) -
A cursor using a query with a filter on a
DATE
orDATETIME
column 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_WS
on a column setNOT NULL
caused incorrect results when used in aLEFT JOIN
. (Bug #11469) -
Signed
BIGINT
would not accept-9223372036854775808
as aDEFAULT
value. (Bug #11215) -
Views did not use indexes on all appropriate queries. (Bug #10031)
-
For
MEMORY
tables, 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 noWHERE
clause 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
VIEW
when 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:
-
MEMORY
tables 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_SUBSTITUTION
Prevents 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 DATABASE
cause 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 BY
query uses a grouping column from the query'sSELECT
clause, 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'sFROM
clause, and allowing columns from theSELECT
clause 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
FROM
clause. (Bug #11211) -
The granting or revocation of privileges on a stored routine is no longer performed when running the server with
--skip-grant-tables
even 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 crashmysqld
by 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 TABLE
db_name
.tbl_name
LIKE ... statement would crash the server when no database was selected. (Bug #11028) -
SELECT DISTINCT
queries orGROUP BY
queries withoutMIN()
orMAX()
could return inconsistent results for indexed columns. (Bug #11044) -
The
SHOW INSTANCE OPTIONS
command 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
ON
condition that evaluated to false could return an incorrect result. (Bug #11285) -
mysqld_safe
would sometimes fail to remove the pid file for the oldmysql
process 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 = NULL
caused an erroneous error message. (Bug #10732) -
Converting a
VARCHAR
column 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_access
column ofroutines
table ofINFORMATION_SCHEMA
was empty. (Bug #11055) -
A
CAST()
value could not be included in aVIEW
. (Bug #11387) -
Server crashed when using
GROUP BY
on the result of aDIV
operation on aDATETIME
value. (Bug #11385) -
Possible
NULL
values inBLOB
columns could crash the server when aBLOB
was used in aGROUP BY
query. (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
DATE
columns. The same issue caused the InnoDB storage engine to issue the warningusing a partial-field key prefix in search
. (Bug #8441) -
The
mysqlhotcopy
script was not parsing the output ofSHOW SLAVE STATUS
correctly when called with the--record_log_pos
option. (Bug #7967) -
SELECT * FROM
table
returned incorrect results when called from a stored procedure, wheretable
had 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 BY
constant
returned multiple rows (it should return a single row). (Bug #8614) -
INSERT INTO SELECT FROM
view
produced 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
VIEW
creation to ensure there are no duplicate column names. (Bug #7448) -
An
ORDER BY
clause 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 TABLE
where 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.TABLES
query 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_SCHEMA
returned 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=2
when the table name lettercase differed in theFROM
andWHERE
clauses. (Bug #9500) -
Fixed server crash due to some internal functions not taking into account that for multi-byte character sets,
CHAR
columns could exceed 255 bytes andVARCHAR
columns could exceed 65,535 bytes. (Bug #11167) -
Fixed locking problems for multiple-statement
DELETE
statements 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,
mysqlshow
did not interpret wildcard characters properly if they were given in the table name argument. (Bug #10947) -
Using
PREPARE
to 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
PREPARE
to prepare a statement that invoked a stored routine that executed the prepared statement caused aPackets out of order
error 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:
mysqld
processes 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_mgm
clientshow
command 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.
NoOfTransactions
too small) causedndb_restore
to 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-lengthCHAR
columns with0x20
. Pad UCS2CHAR
columns 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_cost
system 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
DELIMITER
keyword 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
, androws
columns ofEXPLAIN
output can now beNULL
. This is required for usingEXPLAIN
onSELECT
queries that use no tables (i.e.EXPLAIN SELECT 1
). (Bug #9899) -
Placeholders now can be used for
LIMIT
in prepared statements. (Bug #7306) -
SHOW BINARY LOGS
now displays aFile_size
column that indicates the size of each file. -
The
--delayed-insert
option 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_col
NOT IN (val1
,val2
, ...) andindexed_col
NOT BETWEENval1
ANDval2
.. (Bug #10561) -
Removed
mysqlshutdown.exe
andmysqlwatch.exe
from the Windows “No Installer” distribution (they had already been removed from the “With Installer” distribution before). Removed those programs from the source distribution. -
Removed
WinMySQLAdmin
from 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,InnoDB
no 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_SCHEMA
database for which that user did not have the requisite privileges. (Bug #10964) -
Triggers with dropped functions caused crashes. (Bug #5893)
-
Failure of a
BEFORE
trigger 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 TABLES
mydb
.mytable
WRITE, then a second client attempting to execute aUSE
mydb
; would hang. (Bug #9998) -
The
LAST_DAY()
failed to returnNULL
when 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-tables
generated extraneous warnings. (Bug #9993) -
A problem with the
my_global.h
file 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 DISTINCT
statement to select from a view. (Bug #11111) -
Fixed bug in the MySQL Instance manager that caused the version to always be
unknown
whenSHOW INSTANCE STATUS
was issued. (Bug #10229) -
Using
ORDER BY
to 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
InnoDB
tables 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
ON
in the join conditions. (Bug #6866) -
Using
ALTER TABLE
for a table that had a trigger caused a crash when executing a statement that activated the trigger, and also a crash later withUSE
db_name
for the database containing the table. (Bug #5894) -
Fixed a server crash resulting from an attempt to allocate too much memory when
GROUP BY
blob_col
andCOUNT(DISTINCT)
were used. (Bug #11088) -
Fixed a portability problem for compiling on Windows with Visual Studio 6. (Bug #11153)
-
The incorrect sequence of statements
HANDLER
tbl_name
READindex_name
NEXT without a precedingHANDLER
tbl_name
READindex_name
= (value_list
) for anInnoDB
table resulted in a server crash rather than an error. (Bug #5373) -
On Windows, with
lower_case_table_names
set to 2, usingALTER TABLE
to alter aMEMORY
orInnoDB
table 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 CACHE
for a table while other threads where selecting from the table caused a deadlock. (Bug #10602) -
Fixed a server crash resulting from
CREATE TABLE ... SELECT
that selected from a table being altered byALTER TABLE
. (Bug #10224) -
The
FEDERATED
storage engine properly handled outer joins, but not inner joins. (Bug #10848) -
Consistently report
INFORMATION_SCHEMA
table names in uppercase inSHOW TABLE STATUS
output. (Bug #10059) -
Fixed a failure of
WITH ROLLUP
to sum values properly. (Bug #10982) -
Triggers were not being activated for multiple-table
UPDATE
orDELETE
statements. (Bug #5860) -
INSERT BEFORE
triggers were not being activated forINSERT ... SELECT
statements. (Bug #6812) -
INSERT BEFORE
triggers were not being activated for implicit inserts (LOAD DATA
). (Bug #8755) -
If a stored function contained a
FLUSH
statement, the function crashed when invoked.FLUSH
now is disallowed within stored functions. (Bug #8409) -
Multiple-row
REPLACE
could fail on a duplicate-key error when having oneAUTO_INCREMENT
key and one unique key. (Bug #11080) -
Fixed a server crash resulting from invalid string pointer when inserting into the
mysql.host
table. (Bug #10181) -
Multiple-table
DELETE
did 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_binlog
was set inmy.cnf
. (Bug #10746) -
InnoDB
: Fixed a duplicate key error that occurred withREPLACE
in a table with anAUTO-INC
column. (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.err
log. (Bug #11039) -
Fixed a server crash for
INSERT
orUPDATE
when theWHERE
clause 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 ROLLUP
is 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
DEFAULT
clause toENUM
columns that included no explicitDEFAULT
and 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_count
anderror_count
system variables. (Bug #10339)
Functionality added or changed:
-
Incompatible change:
MyISAM
andInnoDB
tables created withDECIMAL
columns 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_increment
system 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_creators
system 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-creators
server option for setting thelog_bin_trust_routine_creators
system variable from the command line. -
Implemented the
STMT_ATTR_PREFETCH_ROWS
option 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
GRANT
andREVOKE
statements now support anobject_type
clause 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_NAME
columns to theKEY_COLUMN_USAGE
table ofINFORMATION_SCHEMA
. (Bug #9587) -
Added a
--show-warnings
option 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,\w
and\W
may 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
--debug
option to my_print_defaults. -
When the server cannot read a table because it cannot read the
.frm
file, 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 VARIABLES
now shows theslave_compressed_protocol
,slave_load_tmpdir
andslave_skip_errors
system variables. (Bug #7800) -
Removed unused system variable
myisam_max_extra_sort_file_size
. -
Changed default value of
myisam_data_pointer_size
from 4 to 6. This allows us to avoidtable is full
errors for most cases. -
The variable
concurrent_insert
now 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,
VARCHAR
andVARBINARY
columns with a length greater than 65,535 no longer are silently converted toTEXT
orBLOB
columns. Instead, an error occurs. (Bug #8295, Bug #8296) -
The
INFORMATION_SCHEMA.SCHEMATA
table now has aDEFAULT_COLLATION_NAME
column. (Bug #8998) -
InnoDB
: When the maximum length ofSHOW INNODB STATUS
output 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_binlog
option is set and the isolation level of the transaction is not set to serializable thenInnoDB
uses a consistent read for select in clauses likeINSERT INTO ... SELECT
andUPDATE ... (SELECT)
that do not specifyFOR UPDATE
orIN SHARE MODE
. Thus no locks are set to rows read from selected table. -
Updated version of
libedit
to 2.9. (Bug #2596) -
Removed
mysqlshutdown.exe
andmysqlwatch.exe
from the Windows “With Installer” distribution.
Bugs fixed:
-
An error in the implementation of the
MyISAM
compression algorithm causedmyisampack
to 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 anINSERT
statement, then forCALL p()
, theCALL
statement appears in the binary log, but not theINSERT
statement. (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.h
but not yet implemented, such asCURSOR_TYPE_SCROLLABLE
. (Bug #9643) -
MERGE
tables could fail on Windows due to incorrect interpretation of pathname separator characters for filenames in the.MRG
file. (Bug #10687) -
Fixed a server crash for
INSERT ... ON DUPLICATE KEY UPDATE
withMERGE
tables, 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
SESSION
orGLOBAL
for user variables or local variables in stored routines. (Bug #9286) -
Fixed a server crash when using
GROUP BY ... WITH ROLLUP
on an indexed column in anInnoDB
table. (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
BLACKHOLE
storage 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 interface
in source files. (Bug #10241) -
Fix
CREATE TABLE ... LIKE
to work whenlower_case_table_names
is 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 TABLE
statement 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_SCHEMA
tables being inaccessible depending on lettercase used to refer to them. (Bug #10018) -
my_print_defaults was ignoring the
--defaults-extra-file
option or crashing when the option was given. (Bug #9136, Bug #9851) -
The
INFORMATION_SCHEMA.COLUMNS
table was missing columns of views for which the user has access. (Bug #9838) -
Fixed a mysqldump crash that occurred with the
--complete-insert
option when dumping tables with a large number of long column names. (Bug #10286) -
Corrected a problem where
DEFAULT
values where not assigned properly toBIT(1)
orCHAR(1)
columns if certain other columns preceded them in the table definition. (Bug #10179) -
For
MERGE
tables, avoid writing absolute pathnames in the.MRG
file for the names of the constituentMyISAM
tables so that if the data directory is moved,MERGE
tables will not break. For mysqld, write just theMyISAM
table name if it is in the same database as theMERGE
table, 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_HOUR
limit to saymax_connections_per_hour
instead 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
CHAR
orVARCHAR
column withMIN()
orMAX()
andGROUP BY ... WITH ROLLUP
. (Bug #9820) -
Fixed a server crash resulting from use of
SELECT DISTINCT
with 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-file
option does not exist or is otherwise inaccessible, an error now occurs. (Bug #5056) -
net_read_timeout
andnet_write_timeout
were not being respected on Windows. (Bug #9721) -
SELECT
fromINFORMATION_SCHEMA
tables failed if the statement has aGROUP BY
clause and an aggregate function in the select list. (Bug #9404) -
Corrected some failures of prepared statements for SQL (
PREPARE
plusEXECUTE
) to return all rows for someSELECT
statements. (Bug #9096, Bug #9777) -
Remove extra slashes in
--tmpdir
value (for example, convert/var//tmp
to/var/tmp
, because they caused various errors. (Bug #8497) -
Added
Create_routine_priv
,Alter_routine_priv
, andExecute_priv
privileges to themysql.host
privilege table. (They had been added tomysql.db
in MySQL 5.0.3 but not to thehost
table.) (Bug #8166) -
Fixed configure to properly recognize whether NTPL is available on Linux. (Bug #2173)
-
Incomplete results were returned from
INFORMATION_SCHEMA.COLUMNS
forINFORMATION_SCHEMA
tables for non-root
users. (Bug #10261) -
Fixed a portability problem in compiling
mysql.cc
with VC++ on Windows. (Bug #10245) -
SELECT 0/0
returned0
rather 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 VIEW
got 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 LOCK
while anINSERT DELAYED
statement 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
ON
andWHERE
conditions. (Bug #10162) -
RENAME TABLE
for anARCHIVE
table failed if the.arn
file was not present. (Bug #9911) -
Invoking a stored function that executed a
SHOW
statement 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
NULL
key parts in hash indexes onVARCHAR
columns, 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
BIT
data type to theMEMORY
,InnoDB
, andBDB
storage engines. -
SHOW VARIABLES
no longer displays the deprecatedlog_update
system variable. (Bug #9738) -
The behavior controlled by the
--innodb-fast-shutdown
option now can be changed at runtime by setting the value of the globalinnodb_fast_shutdown
system 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,InnoDB
will 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 JOIN
that compared a join column to anIN
subquery. (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 ROLLUP
in theFROM
clause of the main query sometimes resulted in aColumn cannot be null
error. (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
OR
operator. (Bug #9348) -
Fixed a segmentation fault in mysqlcheck that occurred when the last table checked in
--auto-repair
mode returned an error (such as the table being aMERGE
table). (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 NULL
condition. (Bug #9516) -
Executing
LOCK TABLES
and 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
UPDATE
failed with aTable '
tbl_name
' was locked with a READ lock and can't be updated error. (Bug #9486) -
Starting mysqld with the
--skip-innodb
and--default-storage-engine=innodb
(or--default-table-type=innodb
caused a server crash. (Bug #9815) -
Queries containing
CURRENT_USER()
incorrectly were registered in the query cache. (Bug #9796) -
Setting the
storage_engine
system variable toMEMORY
succeeded, but retrieving the variable resulted in a value ofHEAP
(the old name for theMEMORY
storage 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 query
when 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
YEAR
value, corrected a failure of the value to be inYEAR
format. (Bug #8861) -
Fixed a server crash resulting from invocation of a stored function that returned a value having an
ENUM
orSET
data type. (Bug #9775) -
Fixed a server crash resulting from invocation of a stored function that returned a value having a
BLOB
data type. (Bug #9102) -
Fixed a server crash resulting from invocation of a stored function that returned a value having a
BIT
data 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 TABLE
forInnoDB
tables being written twice to the binary log. (Bug #9149) -
InnoDB
: PreventALTER TABLE
from 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
,InnoDB
lock 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 TABLE
andRENAME TABLE
will 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
mysqld
server. (Bug #6762)
Functionality added or changed:
-
Added
ENGINE=MyISAM
table option when creatingmysql.proc
table in mysql_create_system_tables script to make sure the table is created as aMyISAM
table even if the default storage engine has been changed. (Bug #9496) -
SHOW CREATE TABLE
for anINFORMATION_SCHEMA
table no longer prints aMAX_ROWS
value because the value has no meaning. (Bug #8941) -
Invalid
DEFAULT
values forCREATE TABLE
now generate errors. (Bug #5902) -
Added
--show-table-type
option 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-tables
compilation option to configure. (Previously it was necessary to pass-DBIG_TABLES
to 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
!include
and!includedir
implemented 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
XOR
together 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
NULL
values 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-memory
could not be stopped. (Bug #9665) -
Fixed a server crash resulting from multiple executions of a prepared statement involving a join of an
INFORMATION_SCHEMA
table with another table. (Bug #9383) -
Fixed
utf8_spanish2_ci
anducs2_spanish2_ci
collations 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
--tmp
and--single-transaction
options and a non-existent table name. (Bug #9175) -
Allow extra HKSCS and cp950 characters (
big5
extension characters) to be accepted inbig5
columns. (Bug #9357) -
mysql.server no longer uses non-portable alias command or LSB functions. (Bug #9852)
-
Fixed a server crash resulting from
GROUP BY
on a decimal expression. (Bug #9210) -
In prepared statements, subqueries containing parameters were erroneously treated as
const
tables during preparation, resulting in a server crash. (Bug #8807) -
InnoDB:
ENUM
andSET
columns were treated incorrectly as character strings. This bug did not manifest itself withlatin1
collations 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,ENUM
andSET
will 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 BY
orDISTINCT
queries. (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 sync
error 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 ... SELECT
orINSERT INTO ... SELECT
when selecting from multiple-table view. (Bug #8703, Bug #9398) -
TRADITIONAL
SQL 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 KEY
for a table, if the table contained aBIT
column. (Bug #9571) -
Warning message from
GROUP_CONCAT()
did not always indicate correct number of lines. (Bug #8681) -
The commit count cache for
NDB
was not properly invalidated when deleting a record using a cursor. (Bug #8585) -
Fixed option-parsing code for the embedded server to understand
K
,M
, andG
suffixes for thenet_buffer_length
andmax_allowed_packet
options. (Bug #9472) -
Selecting a
BIT
column failed if the binary client/server protocol was used. (Bug #9608) -
Fixed a permissions problem whereby information in
INFORMATION_SCHEMA
could 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
STRICT
mode. (Bug #5907) -
Link with
libsupc++
on Fedora Core 3 to get language support functions. (Bug #6554) -
The value of the
CHARACTER_MAXIMUM_LENGTH
andCHARACTER_OCTET_LENGTH
columns of theINFORMATION_SCHEMA.COLUMNS
table must beNULL
for numeric columns, but were not. (Bug #9344) -
DROP TABLE
did not drop triggers that were defined for the table.DROP DATABASE
did not drop triggers in the database. (Bug #5859, Bug #6559) -
CREATE OR REPLACE VIEW
andALTER VIEW
now require theCREATE VIEW
andDROP
privileges, notCREATE VIEW
andDELETE
. (DELETE
is 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_count
system 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_SCHEMA
tables 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
tee
command in mysql that resulted in mysql crashing. (Bug #8499) -
CAST()
now produces warnings when casting incorrectINTEGER
andCHAR
values. This also applies to implicitstring
tonumber
casts. (Bug #5912) -
ALTER TABLE
now fails inSTRICT
mode if the alteration generates warnings. -
Using
CONVERT('0000-00-00',date)
orCAST('0000-00-00' as date)
inTRADITIONAL
SQL mode now produces a warning. (Bug #6145) -
Inserting a zero date in a
DATE
,DATETIME
orTIMESTAMP
column duringTRADITIONAL
mode now produces an error. (Bug #5933) -
Inserting a zero date into a
DATETIME
column inTRADITIONAL
mode 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 BY
that sometimes caused incorrect sorting ofutf8
data. (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
ROLLUP
andLIMIT
ifSQL_CALC_FOUND_ROWS
was given. (Bug #8617) -
If on replication master a
LOAD DATA INFILE
is interrupted in the middle (integrity constraint violation, killed connection...), the slave used to skip thisLOAD DATA INFILE
entirely, 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 USER
was added. -
Security improvement: The server creates
.frm
,.MYD
,.MYI
,.MRG
,.ISD
, and.ISM
table 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
xxx
symbol 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-udfs
option controls whether UDFs that have only anxxx
symbol can be loaded. By default, the option is off.mysqld
also checks UDF filenames when it reads them from themysql.func
table and rejects those that contain directory pathname separator characters. (It already checked names as given inCREATE FUNCTION
statements.) 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.cnf
in 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_HOME
is used instead of the hard-coded path. -
Support for the
ISAM
storage engine has been removed. If you haveISAM
tables, you should convert them before upgrading. See Sección 2.10.1, “Aumentar la versión de 4.1 a 5.0”. -
Support for
RAID
options inMyISAM
tables 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_BY
no longer is included in theANSI
composite 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 collations
errors.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 TABLE
returns a warning for non-existing tables. The checksum value remainsNULL
as before. (Bug #8256) -
The server now includes a timestamp in the
Ready for connections
message that is written to the error log at startup. (Bug #8444) -
Added
SQL_NOTES
session 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-file
following 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
TEXT
columns for InnoDB tables has changed. Starting from 5.0.3, InnoDB comparesTEXT
columns as space-padded at the end. If you have a non-unique index on aTEXT
column, you should runCHECK TABLE
on it, and runOPTIMIZE TABLE
if the check reports errors. If you have aUNIQUE INDEX
on aTEXT
column, you should rebuild the table withOPTIMIZE TABLE
. -
InnoDB
: Commit after every 10,000 copied rows when executingALTER TABLE
,CREATE INDEX
,DROP INDEX
orOPTIMIZE 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 (
ERROR
afterOK
orEOF
) following aKILL QUERY
statement. (Bug #6804) -
Retrieving from a view defined as a
SELECT
that mixedUNION ALL
andUNION DISTINCT
resulted in a different result than retrieving from the originalSELECT
. (Bug #6565) -
Fixed a problem with non-optimal
index_merge
query execution plans being chosen on IRIX. (Bug #8578) -
BIT
in 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.value
is 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#define
symbols, 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 useslibmysqlclient
orlibmysqld
. (Bug #6149) -
SHOW COLUMNS
now displaysNO
rather than blank in theNull
output 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-checksums
and--innodb-doublewrite
options for mysqld. -
Added
--large-pages
option for mysqld. -
Added
multi_read_range
system variable. -
SHOW DATABASES
,SHOW TABLES
,SHOW COLUMNS
, and so forth display information about theINFORMATION_SCHEMA
database. Also, severalSHOW
statements now accept aWHERE
clause specifying which output rows to display. See Capítulo 22, La base de datos de informaciónINFORMATION_SCHEMA
. -
Added the
CREATE ROUTINE
andALTER ROUTINE
privileges, and made theEXECUTE
privilege operational. -
InnoDB: Corrected a bug in the crash recovery of
ROW_FORMAT=COMPACT
tables that caused corruption. (Bug #7973) There may still be bugs in the crash recovery, especially inCOMPACT
tables. -
When the
MyISAM
storage engine detects corruption of aMyISAM
table, 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
InnoDB
status variables. See Sección 5.3.4, “Variables de estado del servidor”. -
Added the
FEDERATED
storage engine. See Sección 14.6, “El motor de almacenamientoFEDERATED
”. -
SHOW CREATE TABLE
now usesUSING
index_type
rather thanTYPE
index_type
to 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
error
member to theMYSQL_BIND
data structure that is used in the C API for prepared statements. This member is used for reporting data truncation errors. Truncation reporting is enabled via the newMYSQL_REPORT_DATA_TRUNCATION
option for themysql_options()
C API function. -
API change: the
reconnect
flag in theMYSQL
structure 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 LOCK
is now killable while it's waiting for runningCOMMIT
statements to finish. -
MEMORY
(HEAP
) can haveVARCHAR()
fields. -
VARCHAR
columns 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 newVARCHAR
type, then it's converted to aCHAR
column. Currently this happens forNDB
tables. -
InnoDB: Introduced a compact record format that does not store the number of columns or the lengths of fixed-size columns. The old format can be requested by specifying
ROW_FORMAT=REDUNDANT
. The new format (ROW_FORMAT=COMPACT
) is the default. The new format typically saves 20 % of disk space and memory. -
InnoDB: Setting the initial
AUTO_INCREMENT
value for anInnoDB
table usingCREATE TABLE ... AUTO_INCREMENT =
n
now works, andALTER TABLE ... AUTO_INCREMENT =
n
resets the current value. -
Seconds_Behind_Master
isNULL
(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-bin
option but cannot initialize the binary log at startup (that is, an error occurs when writing to the binary log file or binary log index file). -
The binary log file and binary log index file now are handled the same way as
MyISAM
tables when there is a “disk full” or “quota exceeded” error. See 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-index
and without--log-bin
, and when started with--log-slave-updates
and without--log-bin
. -
If the MySQL server is started without an argument to
--log-bin
and without--log-bin-index
, thus not 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_CONNECTIONS
limit, 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-limits
option 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…SELECT
and single tableDELETE…SELECT
clauses wheninnodb_locks_unsafe_for_binlog
is used and isolation level of the transaction is not serializable.InnoDB
uses 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 anInnoDB
deadlock or exceeded InnoDB'sinnodb_lock_wait_timeout
or NDBCluster'sTransactionDeadlockDetectionTimeout
orTransactionInactiveTimeout
, it automatically retriesslave_transaction_retries
times 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 DATA
statement was extended to support user variables in the target column list, and an optionalSET
clause. 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 DATA
was changed, so you can't replicate such statements from a 5.0.3 master to pre-5.0.3 slaves.
Bugs fixed:
-
If a
MyISAM
table on Windows hadINDEX DIRECTORY
orDATA DIRECTORY
table 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_tables
now fixes that themysql
privilege 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_mode
column of themysql.proc
table 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 TABLE
did 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 returnNULL
for invalid values incol_name
, ifcol_name
was 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)
-
HAVING
was treating unsigned columns as signed. (Bug #7425) -
Fixed a problem with boolean full-text searches on
utf8
columns where a double quote in the search string caused a server crash. (Bug #8351) -
For a query with both
GROUP BY
andCOUNT(DISTINCT)
clauses and aFROM
clause with a subquery,NULL
was returned for anyVARCHAR
column 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,TRUNCATE
is executed likeDELETE
. This was necessary becauseTRUNCATE
is implicitly locking tables. (Bug #8850) -
Fixed an optimizer bug that caused incorrectly ordered result from a query that used a
FULLTEXT
index to retrieve rows and there was another index that was usable forORDER BY
. For such a query,EXPLAIN
showedfulltext
join type, but regular (notFULLTEXT
) index in theKey
column. (Bug #6635) -
If
SELECT DISTINCT
named 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
DECIMAL
column containingNULL
to a subquery that producedDECIMAL
values resulted in a server crash. (Bug #8397) -
The
--set-character-set
option 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
MyISAM
table indexes could occur withTRUNCATE TABLE
if the table had already been opened. For example, this was possible if the table had been opened implicitly by selecting from aMERGE
table that mapped to theMyISAM
table. The server now issues an error message forTRUNCATE TABLE
under these conditions. (Bug #8306) -
Setting the connection collation to a value different from the server collation followed by a
CREATE TABLE
statement that included a quoted default value resulted in a server crash. (Bug #8235) -
Fixed handling of table-name matching in mysqlhotcopy to accommodate
DBD::mysql
2.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 VIEW
orDROP VIEW
on that view. (Bug #8050) -
FOUND_ROWS()
returned an incorrect value after aSELECT SQL_CALC_FOUND_ROWS DISTINCT
statement that selected constants and includedGROUP BY
andLIMIT
clauses. (Bug #7945) -
Selecting from an
INFORMATION_SCHEMA
table combined with a subselect on anINFORMATION_SCHEMA
table caused an error with the messageTable
tbl_name
is 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 JOIN
between 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
HAVING
but noGROUP BY
caused 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 NAMES
to 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
EXISTS
orNOT EXISTS
subquery. 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 ignoringNULL
arguments, contrary to the documentation. (Bug #6317) -
Creating a table using a name containing a character that is illegal in
character_set_client
resulted 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_ci
collation. (Bug #8385) -
Some
INFORMATION_SCHEMA
columns that contained catalog identifiers were of typeLONGTEXT
. These were changed toVARCHAR(
N
, whereN
is the appropriate maximum identifier length. (Bug #7215) -
Some
INFORMATION_SCHEMA
columns 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-*-table
options which excluded one temporary table and included another, and the two tables were used in a singleDROP TEMPORARY TABLE IF EXISTS
statement, 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
DUAL
where statements such asSELECT 1 AS a FROM DUAL
would succeed but statements such asSELECT 1 AS a FROM DUAL LIMIT 1
would fail. (Bug #8023) -
Fixed a server crash caused by
DELETE FROM
tbl_name
... WHERE ... ORDER BYtbl_name
.col_name
when theORDER BY
column was qualified with the table name. (Bug #8392) -
Fixed a bug in
MATCH ... AGAINST
in natural language mode that could cause a server crash if theFULLTEXT
index was not used in a join (EXPLAIN
did not showfulltext
join mode) and the search query matched no rows in the table (Bug #8522). -
InnoDB
: Honor the--tmpdir
startup option when creating temporary files. Previously,InnoDB
temporary files were always created in the temporary directory of the operating system. On Netware,InnoDB
will continue to ignore--tmpdir
. (Bug #5822) -
Platform and architecture information in version information produced for
--version
option on Windows was alwaysWin95/Win98 (i32)
. More accurately determine platform asWin32
orWin64
for 32-bit or 64-bit Windows, and architecture asia32
for x86,ia64
for Itanium, andaxp
for 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 INDEX
statement to actually load index in memory. (Bug #8452) -
Fixed a failure of multiple-table updates to replicate properly on slave servers when
--replicate-*-table
options had been specified. (Bug #7011) -
Fixed failure of
CREATE TABLE ... LIKE
Windows when the source or destination table was located in a symlinked database directory. (Bug #6607) -
With
lower_case_table_names
set 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
--help
option. Previously, it ignored the option and attempted to start the server anyway. (Bug #7931) -
Fixed problem in
NO_BACKSLASH_ESCAPES
SQL 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 unsignedBIGINT
number (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 aconst
table (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 DISTINCT
combined 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 TABLE
improperly would accept an index on aTIMESTAMP
column thatCREATE TABLE
would reject. (Bug #7884) -
SHOW CREATE TABLE
now reportsENGINE=MEMORY
rather thanENGINE=HEAP
for aMEMORY
table (unless theMYSQL323
SQL mode is enabled). (Bug #6659) -
Fixed a bug where the use of
GROUP_CONCAT()
withHAVING
caused 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
-not
andtrunc*
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
ucs2
character 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_size
handling, that resulted inTable is full
error when the table was still smaller than the limit. (Bug #7791). -
Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CAN-2005-0004)
-
Fixed a bug that caused server crash if some error occured during filling of temporary table created for derived table or view handling. (Bug #7413)
-
Fixed a bug which caused server crash if query containing
CONVERT_TZ()
function with constant arguments was prepared. (Bug #6849) -
Prevent adding
CREATE TABLE .. SELECT
query to the binary log when the insertion of new records partially failed. (Bug #6682) -
Fixed a bug which caused a crash when only the slave I/O thread was stopped and started. (Bug #6148)
-
Giving mysqld a
SIGHUP
caused it to crash. -
Changed semantics of
CREATE/ALTER/DROP DATABASE
statements so that replication ofCREATE DATABASE
is possible when using--binlog-do-db
and--binlog-ignore-db
. (Bug #6391) -
A sequence of
BEGIN
(orSET AUTOCOMMIT=0
),FLUSH TABLES WITH READ LOCK
, transactional update,COMMIT
,FLUSH TABLES WITH READ LOCK
could hang the connection forever and possibly the MySQL server itself. This happened for example when running theinnobackup
script several times. (Bug #6732) -
mysqlbinlog did not print
SET PSEUDO_THREAD_ID
statements in front ofLOAD DATA INFILE
statements inserting into temporary tables, thus causing potential problems when rolling forward these statements after restoring a backup. (Bug #6671) -
InnoDB: Fixed a bug no error message for ALTER with InnoDB and AUTO_INCREMENT (Bug #7061).
InnoDB
now supportsALTER TABLE...AUTO_INCREMENT = x
query to set auto increment value for a table. -
Made the MySQL server accept executing
SHOW CREATE DATABASE
even if the connection has an open transaction or locked tables; refusing it made mysqldump --single-transaction sometimes fail to print a completeCREATE DATABASE
statement for some dumped databases. (Bug #7358) -
Fixed that, when encountering a “disk full” or “quota exceeded” write error,
MyISAM
sometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714) -
Fixed that
--expire-log-days
was not honored if using only transactions. (Bug #7236) -
Fixed that a slave could crash after replicating many
ANALYZE TABLE
,OPTIMIZE TABLE
, orREPAIR TABLE
statements from the master. (Bug #6461, Bug #7658) -
mysqlbinlog forgot to add backquotes around the collation of user variables (causing later parsing problems as
BINARY
is a reserved word). (Bug #7793) -
Ensured that mysqldump --single-transaction sets its transaction isolation level to
REPEATABLE READ
before proceeding (otherwise if the MySQL server was configured to run with a default isolation level lower thanREPEATABLE READ
it 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_var
hangs them -- which was fixed in MySQL 3.23.50). (Bug #7965) -
InnoDB: Fixed a deadlock without any locking, simple select and update (Bug #7975).
InnoDB
now takes an exclusive lock whenINSERT ON DUPLICATE KEY UPDATE
is 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 LOCK
hanging. (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
NOT
operator has changed so that expressions such asNOT a BETWEEN b AND c
are 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_PRECEDENCE
SQL mode. -
SHOW STATUS
now shows the thread specific status variables andSHOW GLOBAL STATUS
shows 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
HAVING
clause in aSELECT
statement now can refer to columns in theGROUP BY
clause, as required by standard SQL. -
Added the
CREATE USER
andRENAME USER
statements. -
Modify
DROP USER
so 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_value
syntax, whereboolean_value
isTRUE
,FALSE
, orUNKNOWN
. -
Added several
InnoDB
status variables. See Sección 5.3.4, “Variables de estado del servidor”. -
Implemented the
WITH CHECK OPTION
clause forCREATE VIEW
. -
CHECK TABLE
now works for views. -
The
SCHEMA
andSCHEMAS
keywords are now accepted as synonyms forDATABASE
andDATABASES
. -
Added initial support for rudimentary triggers (the
CREATE TRIGGER
andDROP TRIGGER
statements). -
Added basic support for read-only server side cursors.
-
mysqldump --single-transaction --master-data is now able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See Sección 8.7, “El programa de copia de seguridad de base de datos mysqldump”.
-
Added
--start-datetime
,--stop-datetime
,--start-position
,--stop-position
options to mysqlbinlog (makes point-in-time recovery easier). -
Made the MySQL server not react to signals
SIGHUP
andSIGQUIT
on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals (reported as Bug #2030). -
New
--auto-increment-increment
and--auto-increment-offset
startup options. These allow you to set up a server to generate auto-increment values that don't conflict with another server. -
MySQL now by default 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_DATES
SQL mode. -
Added
STRICT_TRANS_TABLES
,STRICT_ALL_TABLES
,NO_ZERO_IN_DATE
,NO_ZERO_DATE
,ERROR_FOR_DIVISION_BY_ZERO
, andTRADITIONAL
SQL modes. TheTRADITIONAL
mode 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_TABLES
mode, you now get an error if you do anINSERT
without specifying all columns that don't have a default value. A side effect of this is that when you doSHOW CREATE
for a new table, you no longer see aDEFAULT
value for a column for which you didn't specify a default value. -
The compilation flag
DONT_USE_DEFAULT_FIELDS
was removed because you can get the same behavior by setting thesql_mode
system variable toSTRICT_TRANS_TABLES
. -
Added
NO_AUTO_CREATE_USER
SQL mode to preventGRANT
from automatically creating new users if it would otherwise do so, unless a password also is specified. -
We now detect too-large floating point numbers during statement parsing and generate an error messages for them.
-
Renamed the
sql_updatable_view_key
system variable toupdatable_views_with_limit
. This variable now can have only two values:-
1
orYES
: 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 aLIMIT
clause for updating. (This is the default value.) -
0
orNO
: Prohibit update of a VIEW, which does not contain a key in the underlying table and the query uses aLIMIT
clause (usually get from GUI tools).
-
-
Reverted output format of
SHOW TABLES
to old pre-5.0.1 format that did not include a table type column. To get the additional column that lists the table type, useSHOW FULL TABLES
now. -
The mysql_fix_privilege_tables script now initializes the global
CREATE VIEW
andSHOW VIEW
privileges in theuser
table to the value of theCREATE
privilege in that table. -
If the server finds that the
user
table has not been upgraded to include the view-related privilege columns, it treats each account as having view privileges that are the same as itsCREATE
privilege. -
InnoDB: If you specify the option
innodb_locks_unsafe_for_binlog
inmy.cnf
, InnoDB in anUPDATE
or aDELETE
only 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
State
column 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-form
is used. -
Two new server system variables were introduced.
auto_increment_increment
andauto_increment_offset
can be set locally or globally, and are intended for use in controlling the behaviour ofAUTO_INCREMENT
columns 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
# at
lines. (Bug #4506) -
Fixed that
CREATE TABLE ... TYPE=HEAP ... AS SELECT...
caused replication slave to stop. (Bug #4971) -
Fixed that
mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...)
failed to disableLOAD DATA LOCAL INFILE
. (Bug #5038) -
Fixed that
disable-local-infile
option had no effect if client read it from a configuration file usingmysql_options(...,MYSQL_READ_DEFAULT,...)
. (Bug #5073) -
Fixed that
SET GLOBAL SYNC_BINLOG
did not work on some platforms (Mac OS X). (Bug #5064) -
Fixed that mysql-test-run failed on the
rpl_trunc_binlog
test if running test from the installed (the target of 'make install') directory. (Bug #5050) -
Fixed that mysql-test-run failed on the
grant_cache
test when run as Unix user 'root'. (Bug #4678) -
Fixed an unlikely deadlock which could happen when using
KILL
. (Bug #4810) -
Fixed a crash when one connection got
KILL
ed while it was doingSTART SLAVE
. (Bug #4827) -
Made
FLUSH TABLES WITH READ LOCK
blockCOMMIT
if server is running with binary logging; this ensures that the binary log position can be trusted when doing a full backup of tables and the binary log. (Bug #4953) -
Fixed that the counter of an
auto_increment
column was not reset byTRUNCATE TABLE
is the table was a temporary one. (Bug #5033) -
Fixed slave SQL thread so that the
SET COLLATION_SERVER...
statements it replicates don't advance its position (so that if it gets interrupted before the actual update query, it 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 InnoDBinnobackup
script. (Bug #5949) -
OPTIMIZE TABLE
,REPAIR TABLE
, andANALYZE TABLE
are now replicated without any error code in the binary log. (Bug #5551) -
If a connection had an open transaction but had done no updates to transactional tables (for example if had just done a
SELECT FOR UPDATE
then executed a non-transactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714) -
If a connection was interrupted by a network error and did a rollback, the network error code got stored into the
BEGIN
andROLLBACK
binary 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-service
option following the service name to cause the server to run using theLocalService
Windows account that has limited privileges. This is in addition to the--defaults-file
option 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
SELECT
is slow, but even usingEXPLAIN
for it takes a noticeable amount of time.) Two new system variables,optimizer_search_depth
andoptimizer_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
USE
db_name
is in effect. -
Explicit
USE
db_name
statements no longer are allowed in a stored procedure.
-
-
Fixed
SHOW TABLES
output field name and values according to standard. Field name changed fromType
totable_type
, values areBASE TABLE
,VIEW
andERROR
. (Bug #4603) -
Added the
sql_updatable_view_key
system variable. -
Added the
--replicate-same-server-id
server option. -
Added
Last_query_cost
status variable that reports optimizer cost for last compiled query. -
Added the
--to-last-log
option to mysqlbinlog, for use in conjunction with--read-from-remote-server
. -
Added the
--innodb-safe-binlog
server option, which adds consistency guarantees between the content ofInnoDB
tables and the binary log. See Sección 5.10.3, “El registro binario (Binary Log)”. -
OPTIMIZE TABLE
forInnoDB
tables is now mapped toALTER TABLE
instead ofANALYZE TABLE
. This rebuilds the table, which updates index statistics and frees space in the clustered index. -
sync_frm
is now a settable global variable (not only a startup option). -
For replication of
MEMORY
(HEAP
) tables: Made the master automatically write aDELETE FROM
statement to its binary log when aMEMORY
table is opened for the first time since master's startup. This is for the case where the slave has replicated a non-emptyMEMORY
table, then the master is shut down and restarted: the table is now empty on master; theDELETE FROM
empties it on slave too. Note that even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. But if you use the--init-file
option to populate theMEMORY
table on the master at startup, it ensures that the failing time interval is zero. (Bug #2477) -
When a session having open temporary tables terminates, the statement automatically written to the binary log is now
DROP TEMPORARY TABLE IF EXISTS
instead ofDROP TEMPORARY TABLE
, for more robustness. -
The MySQL server now returns an error if
SET SQL_LOG_BIN
is issued by a user without theSUPER
privilege (in previous versions it just silently ignored the statement in this case). -
Changed that when the MySQL server has binary logging disabled (that is, no
--log-bin
option was used), then no transaction binary log cache is allocated for connections. This should savebinlog_cache_size
bytes of memory (32KB by default) for every connection. -
Added the
sync_binlog=N
global variable and startup option, which makes the MySQL server synchronize its binary log to disk (fdatasync()
) after every Nth write to the binary log. -
Changed the slave SQL thread to print less useless error messages (no more message duplication; no more messages when an error is skipped because of
slave-skip-errors
). -
DROP DATABASE IF EXISTS
,DROP TABLE IF EXISTS
, single-tableDELETE
, and single-tableUPDATE
now are written to the binary log even if they changed nothing on the master (for example, even if aDELETE
matched no rows). The old behavior sometimes caused bad surprises in replication setups. -
Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See Sección 6.7, “Características de la replicación y problemas conocidos”.
-
Killing a
CHECK TABLE
statement does not result in the table being marked as “corrupted” any more; the table remains as ifCHECK TABLE
had not even started. See Sección 13.5.5.3, “Sintaxis deKILL
”.
Bugs fixed:
-
Strange results with index (x, y) ...
WHERE x=
val_1
AND y>=val_2
ORDER BYpk
; (Bug #3155) -
Subquery and order by (Bug #3118)
-
ALTER DATABASE
caused the client to hang if the database did not exist. (Bug #2333) -
SLAVE START
(which is a deprecated syntax,START SLAVE
should be used instead) could crash the slave. (Bug #2516) -
Multiple-table
DELETE
statements were never replicated by the slave if there were any--replicate-*-table
options. (Bug #2527) -
The MySQL server did not report any error if a statement (submitted through
mysql_real_query()
ormysql_stmt_prepare()
) was terminated by garbage characters. This can happen if you pass a wronglength
parameter to these functions. The result was that the garbage characters were written into the binary log. (Bug #2703) -
Replication: If a client connects to a slave server and issues an administrative statement for a table (for example,
OPTIMIZE TABLE
orREPAIR TABLE
), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must useSTART SLAVE
to get replication going again. (Bug #1858) -
Made clearer the error message that one gets when an update is refused because of the
--read-only
option. (Bug #2757) -
Fixed that
--replicate-wild-*-table
rules apply toALTER DATABASE
when the table pattern is%
, as is the case forCREATE DATABASE
andDROP DATABASE
. (Bug #3000) -
Fixed that when a
Rotate
event is found by the slave SQL thread in the middle of a transaction, the value ofRelay_Log_Pos
inSHOW SLAVE STATUS
remains correct. (Bug #3017) -
Corrected the master's binary log position that
InnoDB
reports when it is doing a crash recovery on a slave server. (Bug #3015) -
Changed the column
Seconds_Behind_Master
inSHOW SLAVE STATUS
to never show a value of -1. (Bug #2826) -
Changed that when a
DROP TEMPORARY TABLE
statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing aSELECT
on the master does not result in a superfluous error on the slave). (Bug #3063) -
Changed that when a thread handling
INSERT DELAYED
(also known as adelayed_insert
thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug #3081) -
Fixed deadlock when two
START SLAVE
commands were run at the same time. (Bug #2921) -
Fixed that a statement never triggers a superfluous error on the slave, if it must be excluded given the
--replicate-*
options. The bug was that if the statement had been killed on the master, the slave would stop. (Bug #2983) -
The
--local-load
option of mysqlbinlog now requires an argument. -
Fixed a segmentation fault when running
LOAD DATA FROM MASTER
afterRESET SLAVE
. (Bug #2922) -
mysqlbinlog --read-from-remote-server read all binary logs following the one that was requested. It now stops at the end of the requested file, the same as it does when reading a local binary log. There is an option
--to-last-log
to get the old behavior. (Bug #3204) -
Fixed mysqlbinlog --read-from-remote-server to print the exact positions of events in the "at #" lines. (Bug #3214)
-
Fixed a rare error condition that caused the slave SQL thread spuriously to print the message
Binlog has bad magic number
and stop when it was not necessary to do so. (Bug #3401) -
Fixed mysqlbinlog not to forget to print a
USE
statement under rare circumstances where the binary log contained aLOAD DATA INFILE
statement. (Bug #3415) -
Fixed a memory corruption when replicating a
LOAD DATA INFILE
when the master had version 3.23. (Bug #3422) -
Multiple-table
DELETE
statements were always replicated by the slave if there were some--replicate-*-ignore-table
options and no--replicate-*-do-table
options. (Bug #3461) -
Fixed a crash of the MySQL slave server when it was built with
--with-debug
and replicating itself. (Bug #3568) -
Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug #3357)
-
If
server-id
was not set using startup options but 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
root
system user, and if you had--log-bin=
somewhere_out_of_var_lib_mysql
it created binary log files owned byroot
in this directory, which remained owned byroot
after the installation. This is now fixed by starting mysqld as themysql
system user instead. (Bug #4038) -
Made
DROP DATABASE
honor the value oflower_case_table_names
. (Bug #4066) -
The slave SQL thread refused to replicate
INSERT ... SELECT
if it examined more than 4 billion rows. (Bug #3871) -
mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug #3875)
-
Fixed incorrect destruction of expression that led to a server crash on complex
AND
/OR
expressions if query was ignored (either by a replication server because of--replicate-*-table
rules, or by any MySQL server because of a syntax error). (Bug #3969, Bug #4494) -
If
CREATE TEMPORARY TABLE t SELECT
failed while loading the data, the temporary table was not dropped. (Bug #4551) -
Fixed that when a multiple-table
DROP TABLE
failed to drop a table on the master server, the error code was not written to the binary log. (Bug #4553) -
When the slave SQL thread was replicating a
LOAD DATA INFILE
statement, it didn't show the statement in the output 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,
InnoDB
is not aware of multiple tablespaces. -
Added support for
SUM(DISTINCT)
,MIN(DISTINCT)
, andMAX(DISTINCT)
. -
The
KILL
statement now takesCONNECTION
andQUERY
modifiers. The first is the same asKILL
with 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
WEEK
andQUARTER
values asINTERVAL
arguments 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
OR
clauses. 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 INTO
list_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: