Devs.tw 是讓工程師寫筆記、網誌的平台。歡迎您隨手紀錄、寫作,方便日後搜尋!
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: