当前位置:网站首页>当 update 修改数据与原数据相同时会被更新吗?
当 update 修改数据与原数据相同时会被更新吗?
2022-07-29 09:20:00 【Young丶】
一、背景
本文主要测试MySQL执行update语句时,针对与原数据(即未修改)相同的update语句会在MySQL内部重新执行吗?
二、测试环境
MySQL5.7.25Centos 7.4
三、binlog_format为ROW
1、参数
2、测试步骤
session1
session2
session1
3、总结
在binlog_format=row和binlog_row_image=FULL时,由于MySQL 需要在 binlog 里面记录所有的字段,所以在读数据的时候就会把所有数据都读出来,那么重复数据的update不会执行。即MySQL 调用了 InnoDB 引擎提供的“修改为 (1,55)”这个接口,但是引擎发现值与原来相同,不更新,直接返回。
四、binlog_format为STATEMENT
1、参数
2、测试步骤
session1
session2
session1
3、总结
在binlog_format=statement和binlog_row_image=FULL时,InnoDB内部认真执行了update语句,即“把这个值修改成 (1,999)“这个操作,该加锁的加锁,该更新的更新。
边栏推荐
- 201803-3 Full Score solution of CCF URL mapping
- 文件上传及拓展
- Parameter initialization
- 2022年P气瓶充装考试模拟100题模拟考试平台操作
- MySQL error summary
- CVPR 2022 | clonedperson: building a large-scale virtual pedestrian data set of real wear and wear from a single photo
- Evaluation index of machine learning classification model and implementation of sklearn code
- Jetpack Glance? The spring of widgets is coming
- VS2015采用loadlibrary方式调用dll库
- 【机器学习】朴素贝叶斯代码练习
猜你喜欢

Unity Xchart3.0基本用法快速上手

Gutcloud technology restcloud completed the pre-A round of financing of tens of millions of yuan

No swagger, what do I use?

dataframe. to_ Sql() inserts too many errors at one time

Excellent package volume optimization tutorial

用户身份标识与账号体系实践

NFA determination and DFA minimization based on C language

User identity identification and account system practice

不用Swagger,那我用啥?

2022年P气瓶充装考试模拟100题模拟考试平台操作
随机推荐
Notes on network principles (five layer network)
I don't know how lucky the boy who randomly typed logs is. There must be a lot of overtime
VS2015采用loadlibrary方式调用dll库
基于ArkUI eTS开发的坚果新闻(NutNews)
36. JS动画
MySQL的数据类型
ICMP message analysis
Leetcode deduction topic summary (topic No.: 53, 3, 141, interview question 022, the entry node of the link in the sword finger offer chain, 20, 19, Niuke NC1, 103, 1143, Niuke 127)
Flowable UI production flow chart
2022 question bank and answers of operation certificate examination for main principals of hazardous chemical business units
不用Swagger,那我用啥?
How does alternates achieve high-performance publish and subscribe?
常用的DOS命令[逐渐完善]
mysql怎么换成中文
The biggest upgrade of Bluetooth over the years: Bluetooth Le audio is about to appear in all kinds of digital products
Can the access database be accessed remotely
Emmet syntax
Jetpack Glance? The spring of widgets is coming
Collation of ml.net related resources
Unity 引导系统.点击目标物体后提示文字变色进入下一步





