当前位置:网站首页>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;边栏推荐
- 基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
- Gary marcus: learning a language is more difficult than you think
- How Google cloud disk is associated with Google colab
- 对this对象的理解
- Basic usage of MFC thread afxbeginthread, passing multiple parameters
- Leetcode - 362 knock counter (Design)
- Leetcode - 225 implements stack with queue
- Understanding of this object
- How to realize page inclusion
- 用GaussDB(for Redis)存画像,推荐业务轻松降本60%
猜你喜欢

HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio

Matlab -- CVX optimization kit installation

P4552 differential

用GaussDB(for Redis)存画像,推荐业务轻松降本60%

Matlab simulation of BPSK modulation system (1)

CVPR 2022 | 网络中批处理归一化估计偏移的深入研究

Equivalent change of resistance circuit (Ⅱ)

通用测试用例写作规范

Circulaindicator component, which makes the indicator style more diversified

Leetcode - 641 design cycle double ended queue (Design)*
随机推荐
Leetcode - 677 key value mapping (Design)*
ML - Speech - Introduction to speech processing
How matlab saves all the data after running
MySQL - user and permission control
No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch trac
How Google cloud disk is associated with Google colab
Redis distributed lock, it's really impossible without it
MySQL tutorial 66 data table query statement
Leetcode - 359 log rate limiter (Design)
BSC智能链合约模式系统开发详情
2021 Jiangsu race a Array line segment tree, maintain value range, Euler power reduction
Cf888g clever dictionary tree + violent divide and conquer (XOR minimum spanning tree)
MySQL tutorial 68-as setting alias
Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
LeetCode - 677 键值映射(设计)*
2019 Shaanxi Provincial race K-variant Dijstra
Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output
MySQL—常用SQL语句整理总结
报表工具的二次革命
用GaussDB(for Redis)存画像,推荐业务轻松降本60%