In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Conclusion: lock tables can implicitly commit uncommitted transactions of other sessions
Test details:
-session 1
Mysql > start transaction
Query OK, 0 rows affected (0.00 sec)
Mysql > show databases
+-+
| | Database |
+-+
| | information_schema |
| | mysql |
| | performance_schema |
| | test |
+-+
4 rows in set (0.00 sec)
Mysql > use test
Database changed
Mysql > create table t_commit (an int)
Query OK, 0 rows affected (0.04 sec)
-session 2
Mysql > select count (*) from test.t_commit
+-+
| | count (*) |
+-+
| | 0 |
+-+
1 row in set (0.01 sec)
-session 1
Mysql > insert into t_commit values (1)
Query OK, 1 row affected (0.01sec)
-session 2
Mysql > lock tables test.t_commit read local
Query OK, 0 rows affected (0.00 sec)
Mysql > select count (*) from test.t_commit
+-+
| | count (*) |
+-+
| | 1 |
+-+
1 row in set (0.00 sec)
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.