Fonctionnalité ajoutée ou modifiée :
Added explanation of hidden SELECT of
UNION in output of EXPLAIN
SELECT statement.
mysql command-line client now supports
multiple -e options. (Bug#591)
New myisam_data_pointer_size system
variable. See Section 5.2.3, « Variables serveur système ».
The --log-warnings server option now is
enabled by default. Disable with
--skip-log-warnings.
The --defaults-file=file_name option now
requires that the filename must exist (safety fix). (Bug#3413)
mysqld_multi now creates the log in
datadir (from [mysqld] section in
my.cnf or compiled in), not in
/tmp - vulnerability id CVE-2004-0388.
Thanks to Christian Hammers from Debian Security Team for
reporting this!
Warning: Incompatible
change! String comparison now works according to
the SQL standard. Because we have that 'a' = 'a
' then from it must follow that 'a' >
'a\t'. (The latter was not the case before 4.1.2.)
To implement it, we had to change how storage engines
compare strings internally. As a side effect, if you have a
table where a CHAR or
VARCHAR column in some row has a value
with the last character less than
ASCII(32), you will have to repair this
table. CHECK TABLES will tell you if this
problem exists. (Bug#3152)
Added support for DEFAULT
CURRENT_TIMESTAMP and for ON UPDATE
CURRENT_TIMESTAMP specifications for
TIMESTAMP columns. Now you can explicitly
say that a TIMESTAMP column should be set
automatically to the current timestamp for
INSERT and/or UPDATE
statements, or even prevent the column from updating
automatically. Only one column with such an auto-set feature
per table is supported. TIMESTAMP columns
created with earlier versions of MySQL behave as before.
Behavior of TIMESTAMP columns that were
created without explicit specification of default/on as
earlier depends on its position in table: If it is the first
TIMESTAMP column, it will be treated as
having been specified as TIMESTAMP DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. In
other cases, it would be treated as a TIMESTAMP
DEFAULT 0 column. NOW is
supported as an alias for
CURRENT_TIMESTAMP.
Warning: Incompatible
change! Unlike in previous versions, explicit
specification of default values for
TIMESTAMP column is never ignored and
turns off the auto-set feature (unless you have
CURRENT_TIMESTAMP as the default).
Warning: Incompatible change! Renamed prepared statements C API functions:
| Old Name | New Name |
mysql_bind_param() |
mysql_stmt_bind_param() |
mysql_bind_result() |
mysql_stmt_bind_result() |
mysql_prepare() |
mysql_stmt_prepare() |
mysql_execute() |
mysql_stmt_execute() |
mysql_fetch() |
mysql_stmt_fetch() |
mysql_fetch_column() |
mysql_stmt_fetch_column() |
mysql_param_count() |
mysql_stmt_param_count() |
mysql_param_result() |
mysql_stmt_param_metadata() |
mysql_get_metadata() |
mysql_stmt_result_metadata() |
mysql_send_long_data() |
mysql_stmt_send_long_data() |
Now all functions that operate with a
MYSQL_STMT structure begin with the
prefix mysql_stmt_.
Warning: Incompatible
change! The signature of the
mysql_stmt_prepare() function was changed
to int mysql_stmt_prepare(MYSQL_STMT *stmt, const
char *query, unsigned long length). To create a
MYSQL_STMT handle, you should use the
mysql_stmt_init() function.
SHOW GRANTS with no
FOR clause or with FOR
CURRENT_USER() shows the privileges for the
current session.
The improved character set support introduced in MySQL 4.1.0
for the MyISAM and
HEAP storage engines is now available for
InnoDB as well.
A name of ``Primary'' no longer can be specified as an index
name. (That name is reserved for the PRIMARY
KEY if the table has one.) (Bug#856)
MySQL now issues a warning when a SET or
ENUM column with duplicate values in the
list is created. (Bug#1427)
Now SQL_SELECT_LIMIT variable has no
influence on subqueries. (Bug#2600)
UNHEX() function implemented. See
Section 12.3, « Fonctions de chaînes de caractères ».
History in command line client does not store multiple copies of identical queries that are run consecutively.
Multi-line queries in the command line client now are stored as a single line.
UUID() function implemented. Note that it
does not work with replication yet. See
Section 12.8.4, « Fonctions diverses ».
Prepared statements with all types of subqueries fixed.
MySQL now supports up to 64 keys per table.
MyISAM tables now support keys up to 1000
bytes long.
MyISAM and InnoDB
tables now support index prefix lengths up to 1000 bytes
long.
If you try to create a key with a key part that is too long, and it is safe to auto-truncate it to a smaller length, MySQL now does so. A warning is generated, rather than an error.
The ft_boolean_syntax variable now can be
changed while the server is running. See
Section 5.2.3, « Variables serveur système ».
REVOKE ALL PRIVILEGES, GRANT FROM
user_list is changed to a more consistent
REVOKE ALL PRIVILEGES, GRANT OPTION FROM
user_list. (Bug#2642)
Internal string-to-number conversion now supports only
SQL:2003 compatible syntax for numbers. In particular,
'0x10'+0 will not work anymore.
(Actually, it worked only on some systems before, such as
Linux. It did not work on others, such as FreeBSD or
Solaris. Making these queries OS-independent was the goal of
this change). Use CONV() to convert
hexadecimal numbers to decimal. E.g.
CONV(MID('0x10',3),16,10)+0.
mysqlhotcopy now works on NetWare.
ALTER TABLE DROP PRIMARY KEY no longer
drops the first UNIQUE index if there is
no primary index. (Bug#2361)
Added latin1_spanish_ci (Modern Spanish)
collation for the latin1 character set.
Added the ENGINE table option as a
synonym for the TYPE option for
CREATE TABLE and ALTER
TABLE.
Added the --default-storage-engine server
option as a synonym for
--default-table-type.
Added the storage_engine system variable
as a synonym for table_type.
Added init_connect and
init_slave server variables. The values
should be SQL statements to be executed when each client
connects or each time a slave's SQL thread starts,
respectively.
C API enhancement:
SERVER_QUERY_NO_INDEX_USED and
SERVER_QUERY_NO_GOOD_INDEX_USED flags are
now set in the server_status field of the
MYSQL structure. It is these flags that
make the query to be logged as slow if
mysqld was started with
--log-slow-queries
--log-queries-not-using-indexes.
For replication of MEMORY
(HEAP) tables: Made the master
automatically write a DELETE FROM
statement to its binary log when a MEMORY
table is opened for the first time since master's startup.
This is for the case where the slave has replicated a
non-empty MEMORY table, then the master
is shut down and restarted: the table is now empty on
master; the DELETE FROM empties it on
slave too. Note that even with this fix, between the
master's restart and the first use of the table on master,
the slave still has out-of-date data in the table. But if
you use the init-file option to populate
the MEMORY table on the master at
startup, it ensures that the failing time interval is zero.
(Bug#2477)
When a session having open temporary tables terminates, the
statement automatically written to the binary log is now
DROP TEMPORARY TABLE IF EXISTS instead of
DROP TEMPORARY TABLE, for more
robustness.
The MySQL server now returns an error if SET
SQL_LOG_BIN or SET
SQL_LOG_UPDATE is issued by a user without the
SUPER privilege (in previous versions it
just silently ignored the statement in this case).
Changed that when the MySQL server has binary logging
disabled (that is, no log-bin option was
used) then no transaction binlog cache is allocated for
connections (this should save
binlog_cache_size bytes of memory (32
kilobytes by default) for every connection).
Added Binlog_cache_use and
Binlog_cache_disk_use status variables
that count the number of transactions that used transaction
binary log and that had to flush this temporary binary log
to disk instead of using only buffer in memory. They can be
used for tuning the binlog_cache_size
system variable.
Added option --replicate-same-server-id.
The Mac OS X Startup Item has been moved from the directory
/Library/StartupItems/MySQL to
/Library/StartupItems/MySQLCOM to avoid
a file name collision with the MySQL Startup Item installed
with Mac OS X Server. See Section 2.8.2, « Notes relatives à Mac OS X ».
Bogues corrigés :
Fixed check of EXPLAIN of
UNION. (Bug#3639)
Fixed a bug in a query that used DISTINCT
and ORDER BY by column's real name, while
the column had an alias, specified in
SELECT clause. (Bug#3681)
Fixed crash of group_concat on expression
with ORDER BY and external ORDER
BY in a query. (Bug#3752)
Fixed a bug in
ALL/SOME subqueries in
case of optimisation (key field present in subquery). (Bug#3646)
Fixed a bug in SHOW GRANTS and
EXPLAIN SELECT character set conversion.
(Bug#3403)
Prepare statements parameter do not cause error message as
fields used in select list but not included in
ORDER BY list.
UNION statements did not consult
SQL_SELECT_LIMIT value when set. This is
now fixed properly, which means that this limit is applied
to the top level query, unless LIMIT for
entire UNION is used.
Fixed a bug in multiple-table UPDATE
statements that resulted in an error when one of the tables
was not updated but was used in the nested query, contained
therein.
Fixed mysql_stmt_send_long_data()
behavior on second execution of prepared statement and in
case when long data had zero length. (Bug#1664)
Fixed crash on second execution of prepared statement with
UNION. (Bug#3577)
Fixed incorrect results of aggregate functions in subquery with empty result set. (Bug#3505)
You can now call mysql_stmt_attr_set(...,
STMT_ATTR_UPDATE_MAX_LENGTH) to tell the client
library to update
MYSQL_FIELD->max_length when doing
mysql_stmt_store_result(). (Bug#1647).
Added support for unsigned integer types to prepared statement API (Bug#3035).
Fixed crash in prepared statements when subquery in the
FROM clause with parameter used. (Bug#3020)
Fixed unknown error when negative value bind to unsigned. (Bug#3223)
Fixed aggregate function in prepared statements. (Bug#3360)
Incorrect error message when wrong table used in
multiple-table DELETE statement in
prepared statements. (Bug#3411)
Requiring UPDATE privilege for tables
which will not be updated in multiple-table
UPDATE statement in prepared statements.
Fixed prepared statement support for
INSERT, REPLACE,
CREATE, DELETE,
SELECT, DO,
SET and SHOW. All
other commands are prohibited via prepared statement
interface. (Bug#3398, Bug#3406, Bug#2811)
Fixed a lot of bugs in GROUP_CONCAT().
(Bug#2695, Bug#3381, Bug#3319)
Added optimization that allows for prepared statements using a large number of tables or tables with a large number of columns to be re-executed significantly faster. (Bug#2050)
Fixed bug that caused execution of prepared statements to fail then table that this statement were using left table cache. This bug showed up as if this prepared statement used random garbage as column names or as server crashes. (Bug#3307)
Fixed a problem resulting from setting the
character_set_results variable to
NULL. (Bug#3296)
Fixed query cache statistics.
Fixed bug in ANALYZE TABLE on a
BDB table inside a transaction that hangs
server thread. (Bug#2342)
Fixed a symlink vulnerability in
mysqlbug script. (Bug#3284)
Fixed a bug in parallel repair (myisamchk
-p, myisam_repair_threads);
sometimes the repair process failed to repair a table. (Bug#1334)
A query that uses both UNION [DISTINCT]
and UNION ALL now works correctly. (Bug#1428)
Table default character set affects
LONGBLOB columns. (Bug#2821)
CONCAT_WS() makes the server die in case
of illegal mix of collations. (Bug#3087)
UTF8 charset breaks joins with mixed column/string constant. (Bug#2959)
Fixed DROP DATABASE to report number of
tables deleted.
Fixed memory leak in the client library when statement
handle was freed on closed connection (call to
mysql_stmt_close after
mysql_close). (Bug#3073)
Fixed server segfaults when processing malformed prepared statements commands. (Bug#2795, Bug#2274)
Fixed using subqueries with OR and
AND functions. (Bug#2838)
Fixed comparison of tables/database names with
--lower_case_table_names option. (Bug#2880)
Removed try to check NULL if index built
on column where NULL is impossible in
IN subquery optimization. (Bug#2393)
Fixed incorrect parsing of subqueries in the
FROM clause. (Bug#2421)
Fixed processing of RAND() in subqueries
with static tables. (Bug#2645)
Fixed bug with quoting of table names in
mysqldump for various values of
sql_mode of server. (Bug#2591)
Fixed bug with storing values that are out of range for
DOUBLE and FLOAT
columns. (Bug#2082)
Fixed bug with compiling --with-pstack with
binutils 2.13.90. (Bug#1661)
Fixed a bug in the GRANT system. When a
password was assigned to an account at the global level and
then privileges were granted at the database level (without
specifying any password), the existing password was replaced
temporarily in memory until the next FLUSH
PRIVILEGES operation or the server was restarted.
(Bug#2953)
Fixed a bug in full-text search on multi-byte character set (such as UTF8) that appeared when a search word was shorter than a matching word from the index (for example, searching for ``Uppsala'' when table data contain ``Uppsa*la''). (Bug#3011)
Fixed a bug that made
Max_used_connections to be less than the
actual maximum number of connections in use simultaneously.
Fixed calculation of Index_length in
HEAP table status for
BTREE indexes. (Bug#2719)
Fixed mysql_stmt_affected_rows() call to
always return number of rows affected by given statement.
(Bug#2247)
Fixed crash in MATCH ... AGAINST() on a
phrase search operator with a missing closing double quote.
(Bug#2708)
Fixed output of mysqldump --tab. (Bug#2705)
Fix for a bug in UNION operations that
prevented proper handling of NULL
columns. This happened only if a column in the first
SELECT node was NOT
NULL. (Bug#2508)
Fix for a bug in UNION operations with
InnoDB storage engine, when some columns
from one table where used in one SELECT
statement and some were used in another
SELECT statement. (Bug#2552)
Fixed a few years old bug in the range optimizer that caused a segmentation fault on some very rare queries. (Bug#2698)
Fixed bug with SHOW CREATE TABLE ...
which didn't properly double quotes. (Bug#2593)
Queries with subqueries in FROM clause
locks all tables at once for now. This also fixed bugs in
EXPLAIN of subqueries in
FROM output. (Bug#2120)
Fixed bug with mysqldump not quoting
``tricky'' names correctly. (Bug#2592)
Fix for a bug that prevented table / column privileges from being loaded on startup. (Bug#2546)
Fixed bug in replication with CREATE TABLE ... LIKE
... that resulted in a statement not being written
to the binary log. (Bug#2557)
Fixed memory leak in INSERT ... ON DUPLICATE KEY
UPDATE .... (Bug#2438)
Fixed bug in the parser, making the syntax
CONVERT(expr,type) legal again.
Fixed parsing of short-form IP addresses in
INET_ATON(). (Bug#2310)
Fixed a bug in CREATE ... SELECT that
sometimes caused a string column with a multi-byte character
set (such as utf8) to have insufficient
length to hold the data.
Fixed a rare table corruption on adding data
(INSERT, REPLACE,
UPDATE, etc. but not
DELETE) to a FULLTEXT
index. (Bug#2417)
Compile the MySQL-client RPM package
against libreadline instead of
libedit. (Bug#2289)
Fix for a crashing bug that was caused by not setting
vio_timeout() virtual function for all
protocols. This bug occurred on Windows. (Bug#2025)
Fix for a bug that caused mysql client
program to erroneously cache the value of the current
database. (Bug#2025)
Fix for a bug that caused client/server communication to be
broken when mysql_set_server_option() or
mysql_get_server_option() were invoked.
(Bug#2207)
Fix for a bug that caused wong results when
CAST() was applied on
NULL to signed or unsigned integer
column. (Bug#2219)
Fix for a crashing bug that occurred in the
mysql client program when database name
was longer then expected. (Bug#2221)
Fixed a bug in CHECK TABLE that sometimes
resulted in a spurious error Found key at page ...
that points to record outside datafile for a table
with a FULLTEXT index. (Bug#2190)
Fixed bug in GRANT with table-level
privilege handling. (Bug#2178)
Fixed bug in ORDER BY on a small column.
(Bug#2147)
Fixed a bug with the INTERVAL() function
when 8 or more comparison arguments are provided. (Bug#1561)
Packaging: Fixed a bug in the Mac OS PKG
postinstall script
(mysql_install_db was called with an
obsolete argument).
Packaging: Added missing file
mysql_create_system_tables to the
server RPM package. This bug was fixed for the 4.1.1 RPMs by
updating the MySQL-server RPM from
MySQL-server-4.1.1-0 to
MySQL-server-4.1.1-1. The other RPMs were
not affected by this change.
Fixed a bug in myisamchk and
CHECK TABLE that sometimes resulted in a
spurious error Found key at page ... that points to
record outside datafile for a table with a
FULLTEXT index. (Bug#1977)
Fixed a hang in full-text indexing of strings in multi-byte
(all besides utf8) charsets. (Bug#2065)
Fixed a crash in full-text indexing of UTF8 data. (Bug#2033)
Replication: a rare race condition in the slave SQL thread that could lead to an incorrect complaint that the relay log is corrupted. (Bug#2011)
Replication: If a client connects to a slave server and
issues an administrative statement for a table (for example,
OPTIMIZE TABLE or REPAIR
TABLE), this could sometimes stop the slave SQL
thread. This does not lead to any corruption, but you must
use START SLAVE to get replication going
again. (Bug#1858)
Replication: in the slave SQL thread, a multiple-table
UPDATE could produce an incorrect
complaint that some record was not found in one table, if
the UPDATE was preceded by a
INSERT ... SELECT. (Bug#1701)
Replication: sometimes the master gets a non-fatal error
during the execution of a statement but finally the
statements succeeds (for example, a write to a
MyISAM table first receives "no space
left on device" but is able to finally complete, see
Section A.4.3, « Comment MySQL gère un disque plein »); the bug was that the master
forgot to reset the error code to 0 after success, so the
error code got into its binary log, thus making the slave
giving false alarms like "did not get the same error as on
master". (Bug#2083)
Removed a misleading "check permissions on master.info" from a replication error message, because the cause of the problem could be different from permissions. (Bug#2121)
Fixed a crash when the replication slave was unable to create the first relay log. (Bug#2145)
ALTER DATABASE caused the client to hang
if the database did not exist. (Bug#2333)
Multiple-table DELETE statements were
never replicated by the slave if there were any
replicate-*-table options. (Bug#2527)
Fixed bug in ALTER TABLE RENAME, when
rename to the table with the same name in another database
silently dropped destination table if it existed. (Bug#2628)
The MySQL server did not report any error if the query
(submitted through mysql_real_query() or
mysql_prepare()) was terminated by
garbage characters (which can happen if you pass a wrong
length parameter to
mysql_real_query() or
mysql_prepare()); the result was that the
garbage characters were written into the binary log. (Bug#2703)
Fixed bug in client library which caused
mysql_fetch and
mysql_stmt_store_result() to hang if they
were called without prior call of
mysql_execute(). Now they give an error
instead. (Bug#2248)
Made clearer the error message which one gets when an update
is refused because of the read-only
option. (Bug#2757)
Fixed that replicate-wild-*-table rules
apply to ALTER DATABASE when the table
pattern is '%', like it is already the case for
CREATE DATABASE and DROP
DATABASE. (Bug#3000)
Fixed that when a Rotate event is found
by the slave SQL thread in the middle of a transaction, the
value of Relay_Log_Pos in SHOW
SLAVE STATUS remains correct. (Bug#3017)
Corrected the master's binary log position that
InnoDB reports when it is doing a crash
recovery on a slave server. (Bug#3015)
Changed the column Seconds_Behind_Master
in SHOW SLAVE STATUS to never show a
value of -1. (Bug#2826)
Changed that when a DROP TEMPORARY TABLE
statement is automatically written to the binary log when a
session ends, the statement is recorded with an error code
of value zero (this ensures that killing a
SELECT on the master does not result in a
superfluous error on the slave). (Bug#3063)
Changed that when a thread handling INSERT
DELAYED (also known as a
delayed_insert thread) is killed, its
statements are recorded with an error code of value zero
(killing such a thread does not endanger replication, so we
thus avoid a superfluous error on the slave). (Bug#3081)
Fixed deadlock when two START SLAVE
commands were run at the same time. (Bug#2921)
Fixed that a statement never triggers a superfluous error on
the slave, if it must be excluded given the
replicate-* options. The bug was that if
the statement had been killed on the master, the slave would
stop. (Bug#2983)
The --local-load option of
mysqlbinlog now requires an argument.
Fixed a segmentation fault when running LOAD DATA
FROM MASTER after RESET SLAVE.
(Bug#2922)
mysqlbinlog --read-from-remote-server
read all binary logs following the one that was requested.
It now stops at the end of the requested file, the same was
it does when reading a local binary log. (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 the Exec_master_log_pos column and
its disk image in the relay-log.info
file to be correct if the master had version 3.23. (The
value was too big by six bytes.) This bug does not exist in
MySQL 5.0. (Bug#3400)
Fixed mysqlbinlog not to forget to print
a USE statement under rare circumstances
where the binary log contained a LOAD DATA
INFILE statement. (Bug#3415)
Fixed a memory corruption when replicating a LOAD
DATA INFILE when the master had version 3.23. Some
smaller problems remain in this setup, See
Section 6.7, « Fonctionnalités de la réplication et problèmes connus ». (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)
This is a translation of the MySQL Reference Manual that can be found at dev.mysql.com. The original Reference Manual is in English, and this translation is not necessarily as up to date as the English version.
