当前位置:网站首页>排他锁(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;
边栏推荐
- Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
- MySQL教程71-WHERE 条件查询数据
- CircleIndicator组件,使指示器风格更加多样化
- No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac
- Leetcode - 379 telephone directory management system (Design)
- MySQL tutorial 67- filter duplicate data using distinct
- MySQL tutorial 66 data table query statement
- R语言ggplot2可视化线图(line)、自定义配置标题文本相关内容颜色和图例(legend)颜色相匹配(和分组线图的颜色相匹配、match colors of groups)
- Leetcode - 707 design linked list (Design)
- Endnote cannot edit range resolution
猜你喜欢

Wavelet transform --dwt2 and wavedec2

LeetCode - 225 用队列实现栈

JWT diagram

面试突击:为什么 TCP 需要 3 次握手?
![[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage](/img/90/51d86111b918eb60761818110cdec4.jpg)
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage

用GaussDB(for Redis)存画像,推荐业务轻松降本60%

LeetCode - 379 电话目录管理系统(设计)

Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output

Equivalent change of resistance circuit (Ⅱ)

Storage structure of cross linked list
随机推荐
Window system black window redis error 20creating server TCP listening socket *: 6379: listen: unknown error19-07-28
Pytoch learning notes -- Summary of common functions 2
How matlab saves all the data after running
Zhaoqi Kechuang high-quality overseas returnee talent entrepreneurship and innovation service platform, online live broadcast Roadshow
CircleIndicator组件,使指示器风格更加多样化
活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」
Dpdk packet receiving and sending problem case: non packet receiving problem location triggered by mismatched packet sending and receiving function
IDEA—点击文件代码与目录自动同步对应
Data system partition design - partition rebalancing
# JWT 图解
Beyond compare 4 realizes class file comparison [latest]
没错,请求DNS服务器还可以使用UDP协议
JVM - classloader and parental delegation model
MySQL tutorial 67- filter duplicate data using distinct
Leetcode - 707 design linked list (Design)
Activity review | July 6 Anyuan AI X machine heart series lecture No. 2 | MIT professor Max tegmark shares "symbiotic evolution of human and AI"
Redis distributed lock, it's really impossible without it
Wechat applet
HDD杭州站·HarmonyOS技术专家分享HUAWEI DevEco Studio特色功能
MySQL tutorial 66 data table query statement