当前位置:网站首页>MySQL table write lock
MySQL table write lock
2022-07-25 16:05:00 【Leon_ Jinhai_ Sun】
Add the same lock to the table session You can read the data of the locking table , Can't read other tables , You can write a locked table, but you can't write other tables .
Different session Reading the locked table will block , You can read other tables , Writing a locked table will block , You can write other tables .
1、session1: lock table mylock write; -- to mylock Table write lock
2、session1: select * from mylock; -- You can query
3、session1:select * from tdep; -- Cannot access non locked table
4、session1:update mylock set name='y' where id=2; -- It can be executed
5、session2:select * from mylock; -- Query blocking
6、session1:unlock tables; -- Release the watch lock
7、session2:4 rows in set (22.57 sec) -- Query execution completed
8、session1:select * from tdep; -- You can visit
边栏推荐
- Geogle colab notes 1-- run the.Py file on the cloud hard disk of Geogle
- MySQL教程65-MySQL操作表中数据
- Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results
- Leetcode - 362 knock counter (Design)
- [IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
- Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
- Typescript learning 2 - Interface
- Pytoch learning notes -- Summary of common functions 2
- Endnote add Chinese gbt7714 style how to quote documents in word
- Activity review | July 6 Anyuan AI X machine heart series lecture No. 2 | MIT professor Max tegmark shares "symbiotic evolution of human and AI"
猜你喜欢

Leetcode - 232 realize queue with stack (design double stack to realize queue)

一文入门Redis

华为2023届提前批预热开始!左 神的程序代码面试指南终派上用场

How matlab saves all the data after running

Leetcode - 303 area and retrieval - array immutable (design prefix and array)

Okaleido上线聚变Mining模式,OKA通证当下产出的唯一方式

Pytoch learning notes -- seresnet50 construction

Leetcode - 641 design cycle double ended queue (Design)*

Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results

Analysis and solution of data and clock mismatch delay in SPI transmission
随机推荐
Pytoch learning notes -- Summary of common functions 3
Pytoch learning notes -- Summary of common functions of pytoch 1
Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results
产品动态丨Android 13 高效适配全新升级
Leetcode - 379 telephone directory management system (Design)
mysql意向锁
MySQL教程68-AS 设置别名
Pytoch learning notes -- seresnet50 construction
Leetcode - 641 design cycle double ended queue (Design)*
Distributed | practice: smoothly migrate business from MYCAT to dble
Leetcode - 707 design linked list (Design)
Dpdk packet receiving and sending problem case: non packet receiving problem location triggered by mismatched packet sending and receiving function
Waterfall flow layout
ML - Speech - Introduction to speech processing
Analysis and solution of data and clock mismatch delay in SPI transmission
通用测试用例写作规范
Gap Locks(间隙锁)
HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio
百奥赛图与LiberoThera共同开发全人GPCR抗体药物取得里程碑式进展
Product dynamics - Android 13 high-efficiency adaptation new upgrade