一. 查看數據庫的事物隔離級別mysql
mysql> show variables like '%isolation'; +-----------------------+-----------------+ | Variable_name | Value | +-----------------------+-----------------+ | transaction_isolation | REPEATABLE-READ | 新版本 | tx_isolation | REPEATABLE-READ | 舊版本 +-----------------------+-----------------+ 2 rows in set (0.00 sec)
二. 修改本次會話的的事物隔離級別sql
mysql> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Query OK, 0 rows affected (0.00 sec)