xiuxiubiu / records

学习资料整理
8 stars 0 forks source link

MySQL InnoDB锁和事务 #5

Open xiuxiubiu opened 4 years ago

xiuxiubiu commented 4 years ago

MySQL InnoDB锁和事务

准备工作

锁类型

事务隔离级别

事务隔离级别 脏读 不可重复读 幻读
读未提交 (Read-Uncommitted)
读提交(Read-Committed)
可重复读(Repeatable-Read)
串行化(Serializable))

Mysql默认隔离级别为reapeatable-read

mysql> select @@tx_isolation;
+-----------------+
| @@tx_isolation  |
+-----------------+
| REPEATABLE-READ |
+-----------------+
1 row in set (0.00 sec)
shixianjian commented 4 years ago

大佬别停呀