当前位置:网站首页>MySQL lock mechanism (example)
MySQL lock mechanism (example)
2022-07-26 16:33:00 【What about Saipan】
Let's take an example , An airplane booking system has two ticket offices a and B , Originally there were A=16 Tickets , At this time, a ticket office sells one A <-- A-1, The remaining 15 Zhang , At this time, the ticket office B also sells one A <-- A-1, The remaining 15 Zhang , Should have been left 14 Zhang's , This means that multiple transactions modify the same data at the same time , A situation that results in inconsistent data
The problem of data inconsistency caused by concurrent operations includes loss operations 、 It can't be read repeatedly 、 read “ dirty ” data
mysql Locking mechanism is used to ensure the effectiveness of concurrent operations and data consistency
The process of locking , It's just that a is modifying A When , Get a lock first , There are many kinds of locks , The functional characteristics are also different , After you get it, you will A Lock it up , So others can't be right A Modified , Only after the execution of Party A's affairs, right A Others can only get the lock after the lock , Then on A To lock , Under modification , This is it. mysql Lock mechanism .
( Personal understanding )
边栏推荐
- Docker install redis? How to configure persistence policy?
- C#读取本地文件夹中所有文件文本内容的方法
- DTS搭载全新自研内核,突破两地三中心架构的关键技术|腾讯云数据库
- vlang捣鼓之路
- Development daily summary (11): file upload function improvement: Chinese character detection and text content processing
- Finally, someone explained the red blue confrontation clearly
- 可信隐私计算框架“隐语”开源专家观点集锦
- [arm learning (9) ARM compiler understanding learning (armcc/armclang)]
- NUC 11 build esxi 7.0.3f install network card driver-v2 (upgraded version in July 2022)
- MVC和ECS两种设计架构的初浅理解
猜你喜欢

Bugku login1

FTP protocol

Re8: reading papers Hier spcnet: a legal stat hierarchy based heterogeneous network for computing legal case

The "nuclear bomb level" log4j vulnerability is still widespread and has a continuing impact

Alibaba Cloud Toolkit —— 项目一键部署工具

该怎么写单元测试呢

The difference and efficiency comparison of three methods of C # conversion integer

Re7:读论文 FLA/MLAC Learning to Predict Charges for Criminal Cases with Legal Basis

Nacos win10 安装配置教程

Comprehensive design of an oppe homepage -- Design of navigation bar
随机推荐
Singleton mode
PAT甲级 1045 Favorite Color Stripe
Linux Installation mysql8.0.29 detailed tutorial
C # set different text watermarks for each page of word
NUC 11构建 ESXi 7.0.3f安装网卡驱动-V2(2022年7月升级版)
Threads and processes
Selection of industrial serial port to WiFi port to Ethernet module of Internet of things
Wechat applet - network data request
JS API summary of Array Operations
Re8: reading papers Hier spcnet: a legal stat hierarchy based heterogeneous network for computing legal case
Clojure Web Development -- ring user guide
Bugku login2
综合设计一个OPPE主页--顶部,头部的设计
基于sisotool极点配置PI参数及基于Plecs的三相电压源逆变器仿真
First knowledge of OpenGL (2) compilation shaders
Comprehensively design an oppe homepage -- Design of star models
Docker install redis? How to configure persistence policy?
How to balance open utilization and privacy security compliance of public data?
Nacos win10 installation and configuration tutorial
2022牛客暑期多校训练营1(ACDGIJ)