In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
The main content of this article is to explain "when the update modification data in MySQL will be executed again at the same time as the original data", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "in MySQL, when update modifies data and the original data at the same time, will it be executed again?"
I. background
The main test of this article is that when MySQL executes update statements, will update statements that are the same as the original data (that is, unmodified) be re-executed within MySQL?
Second, the test environment
MySQL5.7.25
Centos 7.4
3. Binlog_format is ROW
1. Parameters
2. Test steps
Session1
Session2
Session1
3. Summary
In binlog_format=row and binlog_row_image=FULL, because MySQL needs to record all the fields in binlog, all the data will be read out when reading the data, so the update of duplicate data will not be executed. That is, MySQL invokes the interface "modified to (1cm55)" provided by the InnoDB engine, but the engine finds that the value is the same as the original, does not update, and returns directly.
4. Binlog_format is STATEMENT
1. Parameters
2. Test steps
Session1
Session2
Session1
3. Summary
In binlog_format=statement and binlog_row_image=FULL, the update statement is carefully executed within InnoDB, that is, the operation "change this value to (1999)", the lock that should be locked, the update that should be updated.
At this point, I believe you have a deeper understanding of "will it be executed again when the update modified data is the same as the original data in MySQL?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.