Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to query transaction isolation level by mysql

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "mysql how to query transaction isolation level", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "mysql how to query transaction isolation level" article.

Mysql query transaction isolation level methods: 1, start the command line window, connect to the MySQL database; 2, in the command window to execute the "show variables like 'tx_isolation';" or "SELECT @ @ tx_isolation;" command to query.

The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.

The SQL standard supports four transaction isolation levels, READ_UNCOMMITTED (read uncommitted), READ_COMMITTED (read committed), REPEATABLE_READ (repeatable read), SERIALIZABLE (serial read), and MySQL innodb engine supports all of these four transaction isolation levels. The following article will share how to view transaction isolation levels in MySQL.

To query the transaction isolation level by mysql

1. Start the command line window and connect to the MySQL database

The figure shows connecting to the MySQL database through the client command mysql provided by MySQL.

2. Query the current transaction isolation level of the database through the system variable

The figure shows that the current transaction isolation level can be obtained by querying the value of the system variable tx_isolation or transaction_isolation provided by the database.

The default transaction isolation level for MySQL databases is REPEATABLE_READ (repeatable).

Syntax format 1:

Show variables like 'tx_isolation';show variables like' transaction_isolation'

Grammar format 2:

SELECT @ @ tx_isolation;SELECT @ @ transaction_isolation

The above is about the content of this article on "how to query transaction isolation levels in mysql". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report