当前位置:网站首页>排他锁(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;
边栏推荐
- Beyond Compare 4 实现class文件对比【最新】
- I interviewed 8 companies and got 5 offers in a week. Share my experience
- Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
- MySQL教程68-AS 设置别名
- 如何实现页面包含
- Window system black window redis error 20creating server TCP listening socket *: 6379: listen: unknown error19-07-28
- Icpc2021 Kunming m-violence + chairman tree
- Why is preparestatement better and safer?
- CVPR 2022 | 网络中批处理归一化估计偏移的深入研究
- Solve the vender-base.66c6fc1c0b393478adf7.js:6 typeerror: cannot read property 'validate' of undefined problem
猜你喜欢

LeetCode - 707 设计链表 (设计)

Wavelet transform --dwt2 and wavedec2

「数字安全」警惕 NFT的七大骗局

Why is preparestatement better and safer?

ML - Speech - traditional speech model

MySQL—用户和权限管控

如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?

No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac

TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format

HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio
随机推荐
MySQL—用户和权限管控
Gary marcus: learning a language is more difficult than you think
ML - Speech - traditional speech model
LeetCode - 303 区域和检索 - 数组不可变 (设计 前缀和数组)
Pytoch learning notes -- Summary of common functions 2
电阻电路的等效变化(Ⅱ)
Sword finger offer | number of 1 in binary
July 25th, 2022 Daily: Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement
Copy a word style template to another document
Leetcode - 362 knock counter (Design)
Leetcode - 707 design linked list (Design)
Wechat applet
# JWT 图解
Distributed | practice: smoothly migrate business from MYCAT to dble
30 lines write the concurrency tool class yourself (semaphore, cyclicbarrier, countdownlatch)
LeetCode - 379 电话目录管理系统(设计)
Window system black window redis error 20creating server TCP listening socket *: 6379: listen: unknown error19-07-28
Use cpolar to build a business website (how to buy a domain name)
物理防火墙是什么?有什么作用?
Why is preparestatement better and safer?