锁表语句 LOCK TABLES sp_ad READ LOCAL; // 锁表方式 read 读锁 write 写锁 SELECT sum(ad_id) from sp_ad; UNLOCK TABLES; 锁表结果 image.png