Search Results
https://dev.mysql.com/doc/refman/8.4/en/lock-tables.html
LOCK {TABLE | TABLES} tbl_name [[AS] alias] lock_type [, tbl_name [[AS] alias] lock_type] ... lock_type: { READ [LOCAL] | WRITE } UNLOCK {TABLE | TABLES} MySQL enables client sessions to acquire table locks explicitly for the purpose of cooperating ...The second INSERT succeeds because the references to the table use different ...
https://dev.mysql.com/doc/refman/8.4/en/locking-service.html
MySQL distributions provide a locking interface that is accessible at two levels: At the SQL level, as a set of loadable functions that each map onto calls to the service routines. The locking interface has these characteristics: Locks have three ...As a C language interface, callable as a plugin service from server plugins or loadable ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-locking.html
Shared and Exclusive Locks Intention Locks Record Locks Gap Locks Next-Key Locks Insert Intention Locks AUTO-INC Locks Predicate Locks for Spatial Indexes Shared and Exclusive Locks InnoDB implements standard row-level locking where there are two ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-locks-set.html
A locking read, an UPDATE, or a DELETE generally set record locks on every index record that is scanned in the processing of an SQL statement. The locks are normally next-key locks that also block inserts into the “gap” immediately before the ...It does not matter whether there are WHERE conditions in the statement that would exclude the ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-information-schema-understanding-innodb-locking.html
When a transaction updates a row in a table, or locks it with SELECT FOR UPDATE, InnoDB establishes a list or queue of locks on that row. Similarly, InnoDB maintains a list of locks on a table for table-level locks. If a second transaction wants to ...
https://dev.mysql.com/doc/refman/8.4/en/metadata-locking.html
MySQL uses metadata locking to manage concurrent access to database objects and to ensure data consistency. Metadata locking applies not just to tables, but also to schemas, stored programs (procedures, functions, triggers, scheduled events), ...
https://dev.mysql.com/doc/refman/8.4/en/glossary.html
(In InnoDB, the doublewrite buffer assists with durability.) See Also atomic, commit, concurrency, doublewrite buffer, isolation level, locking, rollback, transaction. When you have an auto-incrementing primary key, you can use statement-based ...
https://dev.mysql.com/doc/refman/8.4/en/locking-functions.html
While held by one session, other sessions cannot obtain a lock of the same name. Returns 1 if the lock was obtained successfully, 0 if the attempt timed out (for example, because another client has previously locked the name), or NULL if an error ...
https://dev.mysql.com/doc/refman/8.4/en/internal-locking.html
This section discusses internal locking; that is, locking performed within the MySQL server itself to manage contention for table contents by multiple sessions. This type of locking is internal because it is performed entirely by the server and ...
https://dev.mysql.com/doc/refman/8.4/en/innodb-locking-reads.html
InnoDB supports two types of locking reads that offer extra safety: SELECT ... FOR SHARE Sets a shared mode lock on any rows that are read. LOCK IN SHARE MODE, but LOCK IN SHARE MODE remains available for backward compatibility. However, FOR SHARE ... If you query data and then insert or update related data within the same transaction, the regular SELECT statement does not give enough ...