当前位置:网站首页>MySQL-InnoDB-事务
MySQL-InnoDB-事务
2022-04-23 14:08:00 【InfoQ】
事务 ACID 特性
事务并发带来了哪些问题
脏读

- 事务B更新 id=1 的数据,age 更新为18,不提交事务
- 事务A查询 id=1 的数据
- 事务B回滚刚才的更新操作
不可重复读

- 事务A查询 id=1 的数据
- 事务B更新 id=1 的数据,age 更新为18,并提交事务
- 事务A再次查询 id=1 的数据
幻读

- 事务A查询 age>15 的数据
- 事务B新增一条数据,age=22,并提交事务
- 事务A再次查询 age>15 的数据
事务四种隔离级别
InnoDB 引擎对隔离级别的支持程度


user
id
name
age
id
user
id
name
age
是否解决了脏读的问题?

- 事务B开启手动事务,更新 id=1 的数据,age 更新为18,不提交事务
- 事务A查询 id=1 的数据
- 事务B回滚刚才的更新操作

是否解决了不可重复读的问题?

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://xie.infoq.cn/article/1c2bcdf9ce0eb6ab690107f51
边栏推荐
- On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
- Can global variables be defined in header files
- About the configuration and use of json5 in nodejs
- RecyclerView细节研究-RecyclerView点击错位问题的探讨与修复
- logback-logger和root
- Subscription number development of wechat applet (message push)
- MySQL数据库讲解(七)
- 在MAC上安装mysql
- Research on recyclerview details - Discussion and repair of recyclerview click dislocation
- 帆软实现分页时第一行和最后两行冻结方式
猜你喜欢
Visio installation error 1:1935 2: {XXXXXXXX
VMware installation 64 bit XP Chinese tutorial
Subscription number development of wechat applet (message push)
Wechat applet obtains login user information, openid and access_ token
01-nio basic ByteBuffer and filechannel
金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
帆软中使用if else 进行判断-使用标题条件进行判断
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
VMware15Pro在Deepin系统里面挂载真机电脑硬盘
Wechat applet initializes Bluetooth, searches nearby Bluetooth devices and connects designated Bluetooth (I)
随机推荐
logback-logger和root
On the problem of cliff growth of loss function in the process of training
Call wechat customer service applet
快速搞懂线程实现的三种方式
帆软中使用if else 进行判断-使用标题条件进行判断
gzip和gunzip 解压参数详解
Jacob print word
leetcode--977. Squares of a Sorted Array
Homebrew是什么?以及使用
sql中出现一个变态问题
VMWare安装64位XP中文教程
win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
帆软中单元格中隔行变色以及数量大于100字体变大变红设置
星界边境Starbound创意工坊订阅的mod的存放路径
帆软实现分页时第一行和最后两行冻结方式
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
报表FCRA考试题集及答案(错了11题)
Essential difference between restful WebService and gSOAP webservice
dp-能量项链
redis数据库讲解(四)主从复制、哨兵、Cluster群集