当前位置:网站首页>当 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)“这个操作,该加锁的加锁,该更新的更新。
边栏推荐
- Acwing game 59 [End]
- 先序遍历/后序遍历确定树的大致形态
- Summary of some experiences in the process of R & D platform splitting
- 2022 R2 mobile pressure vessel filling test question simulation test platform operation
- How does xjson implement four operations?
- Unity3d learning notes (I)
- LeetCode刷题(6)
- 机器学习之分类模型评估指标及sklearn代码实现
- [performance optimization methodology series] III. core idea of performance optimization (2)
- Axurerp prototype design starts quickly
猜你喜欢

文件重命名后,怎样将新旧文件名及所在位置导出到excel

Sublime text create page

STM32 application development practice tutorial: getting to know STM32 for the first time

查看端口占用情况

2022电工(初级)考题模拟考试平台操作

How does alternates achieve high-performance publish and subscribe?

Introduction to translation professional qualification (level) examination

存算一体与存内计算计算杂谈

The gold content of PMP certificate has been increased again and included in the scope of Beijing work residence permit

I don't know how lucky the boy who randomly typed logs is. There must be a lot of overtime
随机推荐
Floweable foundation Chapter 1
Asp graduation project - based on C # +asp Design and implementation of enterprise investment value analysis system based on. Net + sqlserver (graduation thesis + program source code) -- enterprise in
Using logistic regression and neural network to deal with complex binary classification problems
远程连接windows版本服务器redis的配置文件设置
Tesseract图文识别--简单
【Unity入门计划】常用学习网址收藏
English high frequency suffix
Mathematical modeling - Differential Equations
23考研人撑住!考研第一波弃考高峰期已经到来!
查看端口占用情况
Memory leaks and common solutions
Summary of research on endogenous information security technology of industrial measurement and control equipment
2022年P气瓶充装考试模拟100题模拟考试平台操作
Flowable 基础篇2
STM32 application development practice tutorial: getting to know STM32 for the first time
C # use restsharp library to realize post request
2022 electrician (elementary) test question simulation test platform operation
md
如何为OpenHarmony做贡献
简述堆和栈的区别





