Skip to content

Lock Table NO_WAIT

Liang G edited this page Jun 7, 2013 · 7 revisions
LOCK TABLES
    tbl_name (AS alias) [lock_type]
    (, tbl_name (AS alias) lock_type) ...

lock_type:
    READ (LOCAL)
  | (LOW_PRIORITY) WRITE
  | [[<a href="#no_wait">NO_WAIT</a]]

NO_WAIT

If a table is locked in NO_WAIT mode, conflicting locks requests that would normally block (while the table is being locked) are aborted instead. An aborted lock request results in the following error being returned to the client:

 ERROR 1689 (ER_LOCK_ABORTED): Wait on a lock was aborted due to a conflicting lock