MySQL Lock Overview The MyISAM storage engine only supports table locks, which is the only lock type supported in the first few versions of MySQL. As applications' requirements for transaction integrity and concurrency continued to increase, MySQL began to develop a transaction-based storage engine. Later, the BDB storage engine that supports page locks and the InnoDB storage engine that supports row locks gradually appeared (InnoDB is actually a separate company and has now been acquired by Oracle). However, MyISAM table locks are still the most widely used lock type. This section will introduce the use of MyISAM table locks in detail. Table lock contention on your system can be analyzed by examining the table_locks_waited and table_locks_immediate status variables: You can analyze the row lock contention on your system by checking the InnoDB_row_lock status variable: Unlock The first show processlist; Find the lock process and kill its ID; The second mysql>UNLOCK TABLES; Lock table Lock the data table to prevent the table from being updated during the backup process mysql>LOCK TABLES tbl_name READ; Add a write lock to the table: mysql>LOCK TABLES tbl_name WRITE; You may also be interested in:
|
<<: How to set up jar application startup on CentOS7
>>: HTML5 and jQuery to implement preview code examples before uploading local pictures
Two implementations of Vue drop-down list The fir...
Table of contents Application scenarios: Method 1...
1. Add alternative text to your logo This has two...
1. Check the MySQL database encoding mysql -u use...
The arrangement layout of aligning the two ends o...
1. Create a configuration file directory cd /home...
SQL implements addition, subtraction, multiplicat...
1. overflow:hidden overflow hidden If overflow:hi...
Suppose now you want to add an item like this to ...
Table of contents 1. Background knowledge 1. Intr...
Today we are going to implement a Thunder Fighter...
Table of contents Preface Method 1: High contrast...
Logpoint-based replication 1. Create a dedicated ...
Recently, an online security scan found a vulnera...
Table of contents 1. Import files 2. HTML page 3....