当前位置:网站首页>MySQL isolation level transactions
MySQL isolation level transactions
2022-07-25 16:05:00 【Leon_ Jinhai_ Sun】
# Inquire about mysql Version of
select version();
# Query the isolation level of the transaction
select @@tx_isolation;
SELECT @@transaction_isolation;
set session tx_isolation='REPEATABLE-READ';
set session tx_isolation='read-committed';
# Set the global transaction isolation level spring The default isolation level is mysql Set the isolation level of (spring The value of is default or -1)
set global transaction_isolation ='read-committed';
show global variables like '%isolation%';
# Query log path
show VARIABLES like 'log_%';
# Query transactions
SELECT * FROM information_schema.INNODB_TRX;
# Query timeout
SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';
# Set timeout
SET innodb_lock_wait_timeout=6;
# Query the log of the last deadlock
show engine innodb status
A client :
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 client :
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;边栏推荐
- MySQL隐式锁
- HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio
- BSC smart chain contract mode system development details
- Crazy God redis notes 12
- "Digital security" alert NFT's seven Scams
- How to build an enterprise level OLAP data engine for massive data and high real-time requirements?
- 排他锁(EXclusive Lock)
- ML - Speech - traditional speech model
- Ice 100g network card fragment message hash problem
- Storage structure of cross linked list
猜你喜欢

Boomi荣获“多元化最佳首席执行官奖”和“职业成长最佳公司奖”,在大型公司类别中跻身50强

Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy

产品动态丨Android 13 高效适配全新升级

Product dynamics - Android 13 high-efficiency adaptation new upgrade

Storage structure of cross linked list

Leetcode - 677 key value mapping (Design)*

ML - Speech - traditional speech model

"Digital security" alert NFT's seven Scams

「数字安全」警惕 NFT的七大骗局

Circulaindicator component, which makes the indicator style more diversified
随机推荐
Reasons for data format conversion when matlab reads the displayed image
权限管理-删除菜单(递归)
mysql 查看是否锁表
MATLAB optimization tool manopt installation
兆骑科创高质量海归人才双创服务平台,线上直播路演
How matlab produces random complex sequences
Circulaindicator component, which makes the indicator style more diversified
"Digital security" alert NFT's seven Scams
乐观锁悲观锁适用场景
Simple rotation map and hamster beating
Is there only one lib under JDBC in Seata?
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
Endnote add Chinese gbt7714 style how to quote documents in word
MySQL教程65-MySQL操作表中数据
Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage
如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format
Equivalent change of resistance circuit (Ⅱ)
Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network