79543

79543



Locking Options for Online DDL

While an InnoDB table is being changed by a DDL operation, the table may or may not be locked,

depending on the internal workings of that operation and the LOCK clause of the alter table

statement. By default, MySQL uses as little locking as possible during a DDL operation; you specify

the clause either to make the locking morę restrictive than it normally would be (thus limiting concurrent

DML, or DML and queries), or to ensure that some expected degree of locking is allowed for an

operation. If the lock clause specifies a level of locking that is not available for that specific kind of

DDL operation, such as lock=shared or lock=none while creating or dropping a primary key, the

clause works like an assertion, causing the statement to fail with an error. The following list shows the

different possibilities for the lock clause, from the most permissive to the most restrictive:

•    For DDL operations with lock=none, both queries and concurrent DML are allowed. This clause

makes the ALTER TABLE fail if the kind of DDL operation cannot be performed with the requested

type of locking, so specify lock=none if keeping the table fully available is vital and it is OK to

cancel the DDL if that is not possible. For example, you might use this clause in DDLs for tables

involving customer signups or purchases, to avoid making those tables

unavailable by mistakenly

issuing an expensive alter table statement.

•    For DDL operations with lock=shared, any writes to the table (that is, DML operations) are

blocked, but the data in the table can be read. This clause makes the ALTER TABLE fail if the kind

of DDL operation cannot be performed with the requested type of locking, so specify lock=shared

if keeping the table available for queries is vital and it is OK to cancel the DDL if that is not possible.



Wyszukiwarka

Podobne podstrony:
Paweł Chorab forth by thc IMO. The plan should include. but not be limited to: detailed safety proce
Error Conditions for Online DDL Here are the primary reasons why an Online DDL operation could fail:
Limitations of Online DDL Take the following considerations into account when creating or dropping I
Performance and Concurrency Considerations for Online DDL Online DDL improves several aspects of MyS
Performance of In-Place versus Table-Copying DDL Operations The raw performance of an Online DDL ope
SQL Syntax for Online DDL Typically, you do not need to do anything special to enable online DDL whe
IMG@59 Zachowywanie wiary An analysis of ESS 2004/5 data by researchers at the Catholic University o
15 7 Putting provisions of a contract into practice. Actually, this phase may not be considered as a
304 (37) 276 Dress Accessońes slightly damaged (an impressed dot here may not be an original feature
DSC03471 stress of anaesthesła may be cribcal lo survival abscess capsuie may not be th*ck enough fo
DSC03471 stress of anaesthesła may be cribcal lo survival abscess capsuie may not be th*ck enough fo
A school year is not an ending. It is a beginning of leaming, a broadening of the mind and
DSCF0039 ESSAYS IN SWEDISH HISTORY for a mess of pottage. If they did so, it was by no means the onl
It is important that you follow some simple rides when producing an engineering drawing which althou
DSC03471 stress of anaesthesła may be cribcal lo survival abscess capsuie may not be th*ck enough fo
Covered Anaerobic Lagoon An naerobic lagoon is sealed with a f1exible cover, and the methane is reco

więcej podobnych podstron