In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "what are the ways to start mysql transactions". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the ways to start mysql transactions?"
Everyone must have come into contact with the transactions in mysql. After we have mastered the basic concepts, we can try to practice transaction startup. The two specific methods are as follows:
1. Display the startup transaction statement, begin or starttransaction. The statement submitted is commit, and the statement for rollback is rollback.
2. Setautocommit=0, which automatically shuts down the thread.
If only one select statement is executed, the transaction starts and does not commit automatically. Until the commit or rollback statement ollback statement is actively executed, or disconnected.
It is recommended that you use setautocommit=1 to start the transaction by displaying sentences.
Long-term transactions can be queried in the innodb_ trx table in the information_schema library, as shown in the following sentence for transactions with a duration longer than 60s.
Example
Select * from information_schema.innodb_trx where TIME_TO_SEC (timediff (now (), trx_started)) > 60 here, I believe you have a deeper understanding of "what are the methods of starting mysql transactions?" 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.