当前位置:网站首页>Four characteristics and isolation level of MySQL transactions
Four characteristics and isolation level of MySQL transactions
2022-07-26 00:20:00 【Camellia——】
-- The ideal state of a transaction at the time of operation : Keep all transactions isolated , They don't influence each other . Because concurrent operations , Multiple users access the same at the same time data . Problems that may cause concurrent access :
-- Dirty reading : One thing reads uncommitted data from another
-- Fantasy reading : The amount of data read twice in a transaction is inconsistent , It is required that the number of data read multiple times in a transaction is consistent Of , This is a insert or delete Problems caused by
-- It can't be read repeatedly : The data read twice in a thing is inconsistent , The requirement is that the data is consistent when read multiple times in a transaction , this It's a business update Problems caused by
-- The four characteristics of things A( Atomicity )C( Consistent line )I( Isolation, )D( persistence )
-- The level of isolation of things
-- read uncommited: Read uncommitted ( The lowest level , The worst security ) Dirty reading will occur 、 It can't be read repeatedly 、 Fantasy reading
-- read commited: Read submitted ( Can prevent dirty reading ), There will be non repeatable reading 、 Fantasy reading
-- repeatable read: Repeatable ( Prevent dirty reading , Non rereadable questions ), Can't prevent unreal reading
-- serializable: Serialization ( It can prevent dirty reading 、 Don't reread 、 Fantasy reading ), efficiency ( Low performance )-- The higher the isolation level of the transaction , The highest security but the lowest performance !
-- View the isolation level of the transaction
SELECT @@tx_isolation; -- mysql The default isolation level :repeatable read: Repeatable !
边栏推荐
- MySQL - database log
- Js理解之路:什么是原型链
- Solve page refresh without attaching data
- Shib (firewood Dog Coin) rose hundreds of times in January. What core elements does a hundred times coin need? 2021-05-09
- Appium中控件元素封装类梳理
- The bull market will continue. Take your money 2021-05-08
- 06_ UE4 advanced_ Set up a large map using the terrain tool
- Unified handling of global exceptions
- How does the server build a virtual host?
- 关于“DBDnet: A Deep Boosting Strategy for ImageDenoising“一文理解
猜你喜欢

What does it mean that the web server stops responding?

Recent impressions about bull market and defi 2021-05-17

栈的表示和实现(C语言)

【Redis】② Redis通用命令;Redis 为什么这么快?;Redis 的数据类型

对“DOF: A Demand-oriented Framework for ImageDenoising“的理解

Appium中控件元素封装类梳理

"Demons dance", is the bull market over? 2021-05-13

Binary tree -- 111. Minimum depth of binary tree

FreeMarker view integration

06_ UE4 advanced_ Set up a large map using the terrain tool
随机推荐
mysql事务的引入
The way of understanding JS: what is prototype chain
[brother hero July training] day 24: linear tree
对“DOF: A Demand-oriented Framework for ImageDenoising“的理解
Hefei approved in advance
Nest. JS uses express but not completely
Leetcode high frequency question 66. add one, give you an array to represent numbers, then add one to return the result
如何让你的 JS 代码写得更漂亮
[英雄星球七月集训LeetCode解题日报] 第25日 树状数组
What are the precautions for using MySQL index? (answer from six aspects)
合肥提前批
Get JD product details original data API
如何用120行代码,实现一个交互完整的拖拽上传组件?
数据流通交易场景下数据质量综合管理体系与技术框架研究
letfaw
Binary tree -- 222. Number of nodes of a complete binary tree
测试7年,面试华为最后面议要薪1万,HR说我不尊重华为,他们没有那么低薪资的岗位~
Solidity智能合约开发 — 3.2-solidity语法数组、结构体、映射
【Redis】② Redis通用命令;Redis 为什么这么快?;Redis 的数据类型
【目录】Nodejs、npm、yarn、BUG