liaowenxiong 2021-10-16 16:20 采纳率: 44.4%
浏览 15

我给表手动加上排他锁后如何释放锁呢?

如下所示:

lock table account write;

如上命令,我手动给表 account 加了表级的排他锁,接着我如何释放锁呢?

  • 写回答

1条回答 默认 最新

  • ACMAIN_CHM 2021-10-16 20:40
    关注

    这类问题,亲自查一下MYSQL官方免费手册不就知道了?

    13.3.6 LOCK TABLES and UNLOCK TABLES Syntax
    LOCK TABLES
    tbl_name [[AS] alias] lock_type
    [, tbl_name [[AS] alias] lock_type] ...
    lock_type: {
    READ [LOCAL]
    | [LOW_PRIORITY] WRITE
    }
    UNLOCK TABLES
    MySQL enables client sessions to acquire table locks explicitly for the purpose of cooperating with
    other sessions for access to tables, or to prevent other sessions from modifying tables during periods
    when a session requires exclusive access to them. A session can acquire or release locks only for
    itself. One session cannot acquire locks for another session or release locks held by another session.
    Locks may be used to emulate

    评论

报告相同问题?

问题事件

  • 创建了问题 10月16日

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备