官术网_书友最值得收藏!

  • MySQL 8 for Big Data
  • Shabbir Challawala Jaydip Lakhatariya Chintan Mehta Kandarp Patel
  • 127字
  • 2021-08-20 10:06:05

NOWAIT and SKIP LOCKED

When rows are locked by other transactions that you are trying to access, then you need to wait for that transaction to release the lock on the same row so that you can access it accordingly. To avoid waiting for the other transaction, InnoDB has added support of the NOWAIT and SKIP LOCKED options. NOWAIT will return immediately with an error in case the requested row is locked rather than going into the waiting mode, and SKIP LOCKED will skip the locked row and never wait to acquire the row lock. Hence, SKIP LOCKED will not consider the locked row in the resulting set:

SELECT * FROM table1 WHERE id = 5 FOR UPDATE NOWAIT;
SELECT * FROM table1 FOR UPDATE SKIP LOCKED;
主站蜘蛛池模板: 安徽省| 桃园市| 阳曲县| 垣曲县| 增城市| 永州市| 五莲县| 阳山县| 苏尼特左旗| 丽江市| 清丰县| 苍溪县| 克东县| 腾冲县| 拉孜县| 博客| 石首市| 安阳市| 克东县| 隆德县| 全椒县| 丹阳市| 云阳县| 新丰县| 武功县| 台北市| 海晏县| 眉山市| 彭州市| 临猗县| 北川| 铜陵市| 沧州市| 涿州市| 新闻| 随州市| 永顺县| 辰溪县| 灯塔市| 佛学| 阿尔山市|