InnoDB
now supports ALTER TABLE
DROP FOREIGN KEY
. You have to use SHOW
CREATE TABLE
to find the internally generated
foreign key ID when you want to drop a foreign key.
SHOW INNODB STATUS
now prints detailed
information of the latest detected FOREIGN
KEY
and UNIQUE KEY
errors. If
you do not understand why InnoDB
gives
the error 150 from a CREATE TABLE
, you
can use this statement to study the reason.
ANALYZE TABLE
now works also for
InnoDB
type tables. It makes 10 random
dives to each of the index trees and updates index
cardinality estimates accordingly. Note that since it is
only an estimate, repeated runs of ANALYZE
TABLE
may produce different numbers. MySQL uses
index cardinality estimates only in join optimization. If
some join is not optimized in the right way, you may try
using ANALYZE TABLE
.
InnoDB
group commit capability now works
also when MySQL binlogging is switched on. There have to be
> 2 client threads for the group commit to become active.
Changed the default value of
innodb_flush_log_at_trx_commit
from 0 to
1. If you have not specified it explicitly in your
my.cnf
, and your application runs much
slower with this new release, it is because the value 1
causes a log flush to disk at each transaction commit.
Added a new global settable MySQL system variable
innodb_max_dirty_pages_pct
. It is an
integer in the range 0 - 100. The default is 90. The main
thread in InnoDB
tries to flush pages
from the buffer pool so that at most this many percents are
not yet flushed at any time.
If innodb_force_recovery=6
, do not let
InnoDB
do repair of corrupt pages based
on the doublewrite buffer.
InnoDB
start-up now happens faster
because it does not set the memory in the buffer pool to
zero.
Fixed a bug : The InnoDB
parser for
FOREIGN KEY
definitions was confused by
the keywords 'foreign key' inside MySQL comments.
Fixed a bug : If you dropped a table to which there was a
FOREIGN KEY
reference, and later created
the same table with non-matching column types,
InnoDB
could assert in
dict0load.c
, in function
dict_load_table()
.
Fixed a bug : GROUP BY
and
DISTINCT
could treat
NULL
values as not equal. MySQL also
failed to do the next-key locking in the case of an empty
index range.
Fixed a bug : Do not commit the current transaction when a
MyISAM table is updated; this also makes CREATE
TABLE
not to commit an InnoDB
transaction, even when binlogging is enabled.
Fixed a bug : We did not allow ON DELETE SET
NULL
to modify the same table where the delete was
made; we can allow it because that cannot produce infinite
loops in cascaded operations.
Fixed a bug : Allow HANDLER PREV
and
NEXT
also after positioning the cursor
with a unique search on the primary key.
Fixed a bug : If MIN()
or
MAX()
resulted in a deadlock or a lock
wait timeout, MySQL did not return an error, but returned
NULL
as the function value.
Fixed a bug : InnoDB
forgot to call
pthread_mutex_destroy()
when a table was
dropped. That could cause memory leakage on FreeBSD and
other non-Linux Unix systems.
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.