当前位置:网站首页>mysql 隔离级别事务
mysql 隔离级别事务
2022-07-25 15:43:00 【Leon_Jinhai_Sun】
# 查询mysql的版本
select version();
# 查询事务的隔离级别
select @@tx_isolation;
SELECT @@transaction_isolation;
set session tx_isolation='REPEATABLE-READ';
set session tx_isolation='read-committed';
# 设置全局的事务隔离级别 spring默认的隔离级别是指mysql设置的隔离级别(spring的值为 default 或 -1)
set global transaction_isolation ='read-committed';
show global variables like '%isolation%';
# 查询日志path
show VARIABLES like 'log_%';
# 查询事务
SELECT * FROM information_schema.INNODB_TRX;
# 查询超时时间
SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';
#设置超时时间
SET innodb_lock_wait_timeout=6;
# 查询最后一次死锁的日志
show engine innodb status
A客户端:
select version();
select @@autocommit;
set session autocommit = 0;
set session tx_isolation='REPEATABLE-READ';
set session tx_isolation='SERIALIZABLE';
START TRANSACTION;
SELECT * from cloudwalk_auth ;
COMMIT;
select @@tx_isolation;
B 客户端:
select @@autocommit;
set session autocommit = 0;
set session tx_isolation='REPEATABLE-READ';
set session tx_isolation='SERIALIZABLE';
start TRANSACTION;
UPDATE cloudwalk_auth set branch_id=-1;
SELECT * from cloudwalk_auth;
COMMIT;
select @@tx_isolation;边栏推荐
- 面试8家公司,1周拿了5个offer,分享一下自己的心得
- Dpdk packet receiving and sending problem case: non packet receiving problem location triggered by mismatched packet sending and receiving function
- Copy a word style template to another document
- Matlab -- CVX optimization kit installation
- P4552 differential
- MySQL - Summary of common SQL statements
- ML - Speech - Introduction to speech processing
- The difference between VaR, let and Const
- Leetcode - 622 design cycle queue (Design)
- Where is there a demo to set up the flex CDC to draw the number of MySQL?
猜你喜欢

Activity review | July 6 Anyuan AI X machine heart series lecture No. 2 | MIT professor Max tegmark shares "symbiotic evolution of human and AI"

ML - Speech - Introduction to speech processing

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network

Baseband simulation system experiment of 4pam in Gaussian channel and Rayleigh channel
![[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training](/img/d4/bcc577f320a893c7006177993b2e7a.png)
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training

Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results

Use cpolar to build a business website (how to buy a domain name)

Equivalent change of resistance circuit (Ⅱ)

通用测试用例写作规范

Leetcode - 359 log rate limiter (Design)
随机推荐
How Google cloud disk is associated with Google colab
The second revolution of reporting tools
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
推荐系统-协同过滤在Spark中的实现
如何实现页面包含
2022-07-25日报:微软提出CodeT:代码生成新SOTA,20个点的性能提升
Cf888g clever dictionary tree + violent divide and conquer (XOR minimum spanning tree)
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage
LeetCode - 359 日志速率限制器 (设计)
TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format
SVD singular value decomposition derivation and application and signal recovery
Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy
Redis分布式锁,没它真不行
ML - Speech - Introduction to speech processing
"Digital security" alert NFT's seven Scams
30 lines write the concurrency tool class yourself (semaphore, cyclicbarrier, countdownlatch)
Gary marcus: learning a language is more difficult than you think
MySQL教程65-MySQL操作表中数据
电阻电路的等效变化(Ⅱ)
HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio