Funcionalidades adicionadas ou alteradas:
Added IGNORE
option for
DELETE
statement.
The MySQL source distribution now also includes the MySQL
Internals Manual internals.texi
.
Added mysql_set_server_option()
C API
client function to allow multiple statement handling in the
server to be enabled or disabled.
The mysql_next_result()
C API function
now returns -1
if there are no more
result sets.
Renamed CLIENT_MULTI_QUERIES
connect
option flag to CLIENT_MULTI_STATEMENTS
.
To allow for a transition period, the old option will
continue to be recognized for a while.
Require DEFAULT
before table and database
default character set. This enables us to use ALTER
TABLE table_name ... CHARACTER SET=...
to change
the character set for all CHAR
,
VARCHAR
, and TEXT
columns in a table.
Added MATCH ... AGAINST( ... WITH QUERY
EXPANSION)
and the
ft_query_expansion_limit
server variable.
Removed unused ft_max_word_len_for_sort
server variable.
Full-text search now supports multi-byte character sets and
the Unicode utf8
character set. (The
Unicode ucs2
character set is not yet
supported.)
Phrase search in MATCH ... AGAINST ( ... IN BOOLEAN
MODE)
no longer matches partial words.
Added aggregate function BIT_XOR()
for
bitwise XOR operations.
Replication over SSL now works.
The START SLAVE
statement now supports an
UNTIL
clause for specifying that the
slave SQL thread should be started but run only until it
reaches a given position in the master's binary logs or in
the slave's relay logs.
Produce warnings even for single-row
INSERT
statements, not just for
multiple-row INSERT
statements.
Previously, it was necessary to set
SQL_WARNINGS=1
to generate warnings for
single-row statements.
Added delimiter
(\d
)
command to the mysql
command-line client
for changing the statement delimiter (terminator). The
default delimiter is semicolon.
CHAR
, VARCHAR
, and
TEXT
columns now have lengths measured in
characters rather than in bytes. The character size depends
on the column's character set. This means, for example, that
a CHAR(n)
column for a multi-byte
character set will take more storage than before. Similarly,
index values on such columns are measured in characters, not
bytes.
LIMIT
no longer accepts negative
arguments (they used to be treated as very big positive
numbers before).
The DATABASE()
function now returns
NULL
rather than the empty string if
there is no database selected.
Added --sql-mode=NO_AUTO_VALUE_ON_ZERO
option to suppress the usual behaviour of generating the
next sequence number when zero is stored in an
AUTO_INCREMENT
column. With this mode
enabled, zero is stored as zero; only storing
NULL
generates a sequence number.
Warning: Incompatible
change! Client authentication now is based on
41-byte passwords in the user
table, not
45-byte passwords as in 4.1.0. Any 45-byte passwords created
for 4.1.0 must be reset after running the
mysql_fix_privilege_tables
script.
Added MySQL Server option and global variable 'secure-auth' that disallows authentication for accounts that have old (pre-4.1.1) passwords.
Added MySQL command line client option 'secure-auth'. If this option is set, client will refuse to send password in old (pre-4.1.1) format.
Warning: Incompatible
change! Renamed the C API
mysql_prepare_result()
function to
mysql_get_metadata()
as the old name was
confusing.
Added DROP USER 'username'@'hostname'
statement to drop an account that has no privileges.
The interface to aggregated UDF functions has changed a bit.
You must now declare a xxx_clear()
function for each aggregate function
XXX()
.
The CONCAT_WS()
function no longer skips
empty strings.
Added new ADDTIME()
,
DATE()
, DATEDIFF()
,
LAST_DAY()
,
MAKEDATE()
,
MAKETIME()
,
MICROSECOND()
,
SUBTIME()
, TIME()
,
TIMEDIFF()
,
TIMESTAMP()
,
UTC_DATE()
,
UTC_TIME()
,
UTC_TIMESTAMP()
, and
WEEKOFYEAR()
functions.
Added new syntax for ADDDATE()
and
SUBDATE()
. The second argument now may be
a number representing the number of days to be added to or
subtracted from the first date argument.
Added new type
values
DAY_MICROSECOND
,
HOUR_MICROSECOND
,
MINUTE_MICROSECOND
,
SECOND_MICROSECOND
, and
MICROSECOND
for
DATE_ADD()
,
DATE_SUB()
, and
EXTRACT()
.
Added new %f
microseconds format
specifier for DATE_FORMAT()
and
TIME_FORMAT()
.
All queries in which at least one SELECT
does not use indexes properly now are written to the slow
query log when long log format is used.
It is now possible to create a MERGE
table from MyISAM
tables in different
databases. Formerly, all the MyISAM
tables had to be in the same database, and the
MERGE
table had to be created in that
database as well.
Adicionada as novas funções COMPRESS()
,
UNCOMPRESS()
e
UNCOMPRESSED_LENGTH()
.
Ao fazer SQL SQL_MODE=#
, para um modo
complexo (como ANSI
) agora atualizamos a
variável SQL_MODE
para incluir todas as
opções que o modo exige.
Adicionada a função ROLLUP
OLAP (Online
Analytical Processing - Processamento Analítico Online),
que lhe dá um resumo para cada nível GROUP
BY
.
Adicionado os códigos SQLSTATE
para
todos os erros do servidor.
Adicionado mysql_sqlstate()
e
mysql_stmt_sqlstate()
que retornam o
código de erro SQLSTATE
para o último
erro.
--lower-case-table-names=1
agora também
faz a aliases caso insensitivo. (Bug#534)
Colunas TIME
com valor de horas maior do
que 24 eram retornadas incorretamente para o cliente.
As instruções ANALYZE
,
OPTIMIZE
, REPAIR
e
FLUSH
são agora armazenados no log
binário e assim replicados para o slave. Este registro não
ocorre se a palavra chave opcional
NO_WRITE_TO_BINLOG
(ou seu alias
LOCAL
) for usada. As exceções são que
FLUSH LOGS
, FLUSH
MASTER
, FLUSH SLAVE
e
FLUSH TABLES WITH READ LOCK
, não são
registrados no log em qualquer caso. Para uma sintaxe
completa, veja Secção 4.6.4, “Sintaxe de FLUSH
”.
Nova variável global RELAY_LOG_PURGE
para habilitar ou desabilitar automaticamente a remoção de
relay logs.
LOAD DATA
agora produz avisos que podem
ser buscados com SHOW WARNINGS
.
Adicionado o suporte a sintaxe CREATE TABLE
nome_tabela (LIKE nome_tabela2)
.
CREATE TABLE nome_tabela (...)
TYPE=storage_engine
agora gera um aviso se o
mecanismo de armazenamento não for respeitado. A tabela
ainda é criada como MyISAM
, como antes.
Muitas sub selectas são muito mais rápidas que antes.
Disabled the PURGE LOGS
statement that
was added in in version 4.1.0. The statement now should be
issued as PURGE MASTER LOGS
or
PURGE BINARY LOGS
.
Added SHOW BDB LOGS
as an alias for
SHOW LOGS
.
Added SHOW MASTER LOGS
(which had been
deleted in version 4.1.0) as an alias for SHOW
BINARY LOGS
.
Added Slave_IO_State
and
Seconds_Behind_Master
columns to the
output of SHOW SLAVE STATUS
.
Slave_IO_State
indicates the state of the
slave I/O thread, and
Seconds_Behind_Master
indicates the
number of seconds by which the slave is late compared to the
master.
--lower-case-table-names=1
now also makes
aliases case insensitive. (Bug#534)
Bugs corrigidos:
Fixed merging types and length of fields in
UNION
Fixed a bug in privilege handling that caused connections from certain IP addresses to be assigned incorrect database-level privileges. A connection could be assigned the database privileges of the previous successful authentication from one of those IP addresses, even if the IP address username and database name were different. (Bug#1636)
Error-handling functions were not called properly when an
error resulted from [CREATE | REPLACE| INSERT] ...
SELECT
statements.
HASH
, BTREE
,
RTREE
, ERRORS
, and
WARNINGS
no longer are reserved words.
(Bug#724)
Fix for bug in ROLLUP
when all tables
were const
tables. (Bug#714)
Fixed a bug in UNION
that prohibited
NULL
values from being inserted into
result set columns where the first SELECT
of the UNION
retrieved NOT
NULL
columns.
Fixed name resolution of columns of reduced subqueries in unions. (Bug#745)
Fixed memory overrun in subqueries in select list with
WHERE
clause bigger than outer query
WHERE
clause. (Bug#726)
Fixed a bug that caused MyISAM
tables
with FULLTEXT
indexes created in 4.0.x to
be unreadable in 4.1.x.
Fixed a data loss bug in REPAIR TABLE ...
USE_FRM
when used with tables that contained
TIMESTAMP
columns and were created in
4.0.x.
Fixed reduced subquery processing in ORDER
BY
/GROUP BY
clauses. (Bug#442)
Fixed name resolution of outer columns of subquery in
INSERT
/REPLACE
statements. (Bug#446)
Fixed bug in marking columns of reduced subqueries. (Bug#679)
Fixed a bug that made CREATE FULLTEXT
INDEX
syntax illegal.
Fixed a crash when a SELECT
that required
a temporary table (marked by Using
temporary
in EXPLAIN
output)
was used as a derived table in EXPLAIN
command. (Bug#251)
Fixed a rare table corruption bug in
DELETE
from a big table with a
new (created by MySQL-4.1)
fulltext index.
LAST_INSERT_ID()
now returns 0 if the
last INSERT
statement didn't insert any
rows.
Corrigido a perda dos últimos caracteres na saída da função (Bug#447)
Corrigido um erro de replicação raro quando um transação
extendia em dois ou mais relay logs e o escravo era parada
enquanto ele estava executando a parte da transação que
estava no segundo relay log ou em um adicional. Então a
replicação parava no inicio do segundo relay log ou
adicional, o que estava incorreto. (ele deve parar no
BEGIN
, no primeiro relay log). (Bug#53)
Agora CONNECTION_ID()
é replicado
apropriadamente (Bug#177).
A nova função PASSWORD()
na versão 4.1
é replicada apropriadamente (Bug#344).
Corrigida a dupla liberação de memória
Corrigido um erro em UNION
envolvendo
tabelas temporárias.
Corrigido um erro de falha em DERIVED
TABLES
quando EXPLAIN
é usado
em um DERIVED TABLES
com um join
Corrigido um erro de falha no DELETE
com
ORDER BY
e LIMIT
causado pala inicialização do vetor do ponteiro de
referências.
Corrigido um erro na função USER()
causado pelo erro no tamanho da string alocada
Corrigido um erro de falha quando se tentava criar uma
tabela com coluna do tipo GEOMETRY
com um
mecanismo de armazenamenti que não a suporta.
Corrigido um erro de falha no UNION
causado pela lista de select vazia e um campo não existente
sendo usado em algumas das instruções
SELECTs
individuais.
Corrigido um erro de replicação com um master na versão
3.23 e um slave na 4.0: o slave perdia a replicação de
tabelas temporárias se FLUSH LOGS
era
executado no master (Bug#254).
Corrigido um bug de segurança: Um servidor compilado ser
suporte a SSL ainda permitia conexões de usuários que
possuiam a opção REQUIRE SSL
especificado para as suas contas.
Quando um usuário indefinido era usado em uma atualização
de consulta no master (como INSERT INTO t
VALUES(@a)
onde @a
nunca havia
sido definido por esta conexão), então o slave podia
replicar a consulta de forma incorreta se uma transação
anterior no master usava uma variável de usuário de mesmo
nome. (Bug#1331)
Corrigido um erro com instruções preparadas: O uso do
parâmetro ?
de instruções preparadas
como argumento de certas funções e cláusulas fazia com
que o servidor falhasse durante chamadas
mysql_prepare()
. (Bug#1500)
Corrigido um erro com instruções preparadas: depois da chamada de mysql_stmt_prepare, colchetes são permitidos em todas as instruções consequentes, mesmo se eles não forem preparados (Bug#1946)
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.