mysql> flush tables with read lock;

flush tables with read lock 会去关闭已经打开的所有文件,它要做这个操作就先要拿到锁;当发起这个语句的session退出之后,才会释放锁。由于它拿到的是S锁,它有能力阻塞innodb表的commit操作;也就是说它能阻塞innodb的写入操作;由于flush tables with read lock 的这个特性,它通常用在备份的过程中,以此来得到一个一致的备份。

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-07-05
猜你喜欢
  • 2022-01-31
  • 2022-12-23
  • 2021-09-29
  • 2022-01-05
  • 2021-06-13
相关资源
相似解决方案