![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461961320.webp)
The
MERGE
Storage Engine
1300
• Currently, cascaded foreign key actions do not activate triggers.
• You cannot create a table with a column name that matches the name of an internal InnoDB column
(including
DB_ROW_ID
,
DB_TRX_ID
,
DB_ROLL_PTR
, and
DB_MIX_ID
). In versions of MySQL before
5.0.21 this would cause a crash, since 5.0.21 the server will report error 1005 and refers to error –1
in the error message. This restriction applies only to use of the names in uppercase.
• As of MySQL 5.0.19,
InnoDB
does not ignore trailing spaces when comparing
BINARY
or
VARBINARY
column values. See
Section 11.1.6.2, “The
BINARY
and
VARBINARY
Types”
.
Locking and Transactions
•
LOCK TABLES
acquires two locks on each table if
innodb_table_locks=1
(the default). In
addition to a table lock on the MySQL layer, it also acquires an
InnoDB
table lock. Versions of
MySQL before 4.1.2 did not acquire
InnoDB
table locks; the old behavior can be selected by setting
innodb_table_locks=0
. If no
InnoDB
table lock is acquired,
LOCK TABLES
completes even if
some records of the tables are being locked by other transactions.
• All
InnoDB
locks held by a transaction are released when the transaction is committed or
aborted. Thus, it does not make much sense to invoke
LOCK TABLES
on
InnoDB
tables in
autocommit=1
[436]
mode because the acquired
InnoDB
table locks would be released
immediately.
• You cannot lock additional tables in the middle of a transaction because
LOCK TABLES
performs an
implicit
COMMIT
and
UNLOCK TABLES
.
•
InnoDB
has a limit of 1023 concurrent transactions that have created undo records by modifying
data. Workarounds include keeping transactions as small and fast as possible, delaying changes
until near the end of the transaction, and using stored routines to reduce client/server latency delays.
Applications should commit transactions before doing time-consuming client-side operations.
14.3. The
MERGE
Storage Engine
The
MERGE
storage engine, also known as the
MRG_MyISAM
engine, is a collection of identical
MyISAM
tables that can be used as one. “Identical” means that all tables have identical column and index
information. You cannot merge
MyISAM
tables in which the columns are listed in a different order, do
not have exactly the same columns, or have the indexes in different order. However, any or all of the
MyISAM
tables can be compressed with
myisampack
. See
Section 4.6.5, “
myisampack
— Generate
Compressed, Read-Only MyISAM Tables”
. Differences in table options such as
AVG_ROW_LENGTH
,
MAX_ROWS
, or
PACK_KEYS
do not matter.
When you create a
MERGE
table, MySQL creates two files on disk. The files have names that begin with
the table name and have an extension to indicate the file type. An
.frm
file stores the table format,
and an
.MRG
file contains the names of the underlying
MyISAM
tables that should be used as one. The
tables do not have to be in the same database as the
MERGE
table.
You can use
SELECT
,
DELETE
,
UPDATE
, and
INSERT
on
MERGE
tables. You must have
SELECT
[578]
,
DELETE
[577]
, and
UPDATE
[578]
privileges on the
MyISAM
tables that you map to a
MERGE
table.
Note
The use of
MERGE
tables entails the following security issue: If a user has
access to
MyISAM
table
t
, that user can create a
MERGE
table
m
that accesses
t
. However, if the user's privileges on
t
are subsequently revoked, the user can
continue to access
t
by doing so through
m
. If this behavior is undesirable, you
can start the server with the new
--skip-merge
[420]
option to disable the
MERGE
storage engine. This option is available as of MySQL 5.0.24.
Use of
DROP TABLE
with a
MERGE
table drops only the
MERGE
specification. The underlying tables are
not affected.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...