Rechercher dans le manuel MySQL
15.7 InnoDB Locking and Transaction Model
[+/-]
To implement a large-scale, busy, or highly reliable database
application, to port substantial code from a different database
system, or to tune MySQL performance, it is important to understand
InnoDB
locking and the InnoDB
transaction model.
This section discusses several topics related to
InnoDB
locking and the InnoDB
transaction model with which you should be familiar.
Section 15.7.1, “InnoDB Locking” describes lock types used by
InnoDB
.Section 15.7.2, “InnoDB Transaction Model” describes transaction isolation levels and the locking strategies used by each. It also discusses the use of
autocommit
, consistent non-locking reads, and locking reads.Section 15.7.3, “Locks Set by Different SQL Statements in InnoDB” discusses specific types of locks set in
InnoDB
for various statements.Section 15.7.4, “Phantom Rows” describes how
InnoDB
uses next-key locking to avoid phantom rows.Section 15.7.5, “Deadlocks in InnoDB” provides a deadlock example, discusses deadlock detection and rollback, and provides tips for minimizing and handling deadlocks in
InnoDB
.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-innodb-locking-transaction-model.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.