尤川豪   ·  3年前
445 貼文  ·  275 留言

為什麼鎖住 table 之後不能存取其他沒鎖住的 table?

the following error message

table was not locked with lock tables

為什麼 mysql 要這樣設計?

要求工程師使用 LOCK TABLES 的時候一定要把這次 connection 用到的 table 通通鎖住,不能只是鎖住自己以為的幾張 table?


https://mariadb.com/kb/en/lock-tables/

While a connection holds an explicit lock on a table, it cannot access a non-locked table. If you try, the following error will be produced:

  分享   共 1,081 次點閱
共有 0 則留言
還沒有人留言。歡迎分享您的觀點、或是疑問。
您的留言
尤川豪
445 貼文  ·  275 留言

Devs.tw 是讓工程師寫筆記、網誌的平台。隨手紀錄、寫作,方便日後搜尋!

歡迎您一起加入寫作與分享的行列!

查看所有文章