SHOW PROCESSLIST查看数据库中表的状态,是否被锁
select * from t1 where uid='xxxx' for update //在有索引(例如uid)的情况下是行锁,否则是表锁
SHOW PROCESSLIST查看数据库中表的状态,是否被锁
select * from t1 where uid='xxxx' for update //在有索引(例如uid)的情况下是行锁,否则是表锁
转载于:https://my.oschina.net/u/1032854/blog/356632