当前位置:网站首页>排他锁(EXclusive Lock)
排他锁(EXclusive Lock)
2022-07-25 15:43:00 【Leon_Jinhai_Sun】
排他锁(EXclusive Lock),又称X锁、独占锁、写锁。针对行锁。
当有事务对数据加写锁后,其他事务不能再对锁定的数据加任何锁,又因为InnoDB对select语句默认不加锁,所以其他事务除了不能写操作外,照样是允许读的(尽管不允许加读锁)。
主要为了在事务进行写操作时,不允许其他事务修改。
加锁方式:
自动:DML语句默认加写锁
手动:select * from T where id=1 for update;
释放方式:
commit、rollback;
边栏推荐
- 百奥赛图与LiberoThera共同开发全人GPCR抗体药物取得里程碑式进展
- MySQL tutorial 67- filter duplicate data using distinct
- 泰山OFFICE技术讲座:英寸,厘米,磅,派卡,提,行,字行,像素的换算关系
- Leetcode - 359 log rate limiter (Design)
- Storage structure of cross linked list
- 活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」
- Distributed | practice: smoothly migrate business from MYCAT to dble
- How to realize page inclusion
- Record Locks(记录锁)
- 一文入门Redis
猜你喜欢

Leetcode - 379 telephone directory management system (Design)

LeetCode - 641 设计循环双端队列(设计)*

Understand "average load"

【IJCAI 2022】参数高效的大模型稀疏训练方法,大幅减少稀疏训练所需资源

Alibaba's internal "100 billion level concurrent system architecture design notes" are all inclusive, too comprehensive

The second revolution of reporting tools

Beyond Compare 4 实现class文件对比【最新】

Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)

面试突击:为什么 TCP 需要 3 次握手?

MySQL - user and permission control
随机推荐
Leetcode - 707 design linked list (Design)
Data system partition design - Request Routing
# JWT 图解
How to solve cross domain problems
Activity review | July 6 Anyuan AI X machine heart series lecture No. 2 | MIT professor Max tegmark shares "symbiotic evolution of human and AI"
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
LeetCode - 677 键值映射(设计)*
没错,请求DNS服务器还可以使用UDP协议
MySQL tutorial 68-as setting alias
Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
Leetcode - 379 telephone directory management system (Design)
Cf750f1 thinking DP
SVD singular value decomposition derivation and application and signal recovery
组件化和模块化
开发者如何为React Native选择合适的数据库
Gary marcus: learning a language is more difficult than you think
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
共2600页!又一份神级的面试手册面世~
Leetcode - 641 design cycle double ended queue (Design)*
Endnote cannot edit range resolution