1.选择数据库,查看当前事务隔离界别

select @@tx_isolation;

 

2.开启事务,回滚事务

 

3.事务级别中脏读,幻读 

 

4.MySQL事务autocommit设置,每次sql必须用commit提交生效.

 

MySQL默认操作模式就是autocommit自动提交模式。这就表示除非显式地开始一个事务,否则每个查询都被当做一个单独的事务自动执行。我们可以通过设置autocommit的值改变是否是自动提交autocommit模式。

通过以下命令可以查看当前autocommit模式

show variables like 'autocommit';

 

关闭自动提交,每次sql必须通过commit命令提交.

mysql> set autocommit = 0;

 

https://blog.csdn.net/f110300641/article/details/83988706

 

 

 

相关: https://www.cnblogs.com/fps2tao/p/7894505.html

 

相关文章:

  • 2021-06-28
  • 2021-06-29
  • 2021-07-09
  • 2022-01-12
  • 2021-04-01
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-08
相关资源
相似解决方案