mysql 行锁 表锁

 

 MySQL数据库
- 引擎:
- innodb
- 支持事务
- 锁
- 行锁
- 表锁
- 示例:
- 终端:
begin;
select xx from xx for update;
commit;
- pymysql
cursor.execute('select * from xx for update')
- django
with trancation.automic():
models.User.objects.all().for_update()
- mysaim
- 不支持事务
- 锁
- 表锁
- 快

posted @ 2019-09-23 09:59  jiuchen  阅读(325)  评论(0编辑  收藏  举报