數據庫如何鎖定一行

一、鎖定單行數據 執行命令爲:beginàselect  *from user where id=2 for update; àcommit; 二、通過show status like ‘%innodb_row_lock%’;分析系統上行鎖的爭奪情況 參數01:innodb_row_lock_current_waits當前正在等待鎖定的數量 參數02:innodb_row_lock_time從系統
相關文章
相關標籤/搜索