nerdexam
Oracle

1Z0-873 · Question #50

Which of the following statements are true regarding table locks?

The correct answer is A. They can only be released by the client holding them. C. They are implicitly released when the connection is closed. Explicit locks held by a client also are released if the client issues another LOCK TABLES statement. Locks cannot be maintained across connections; if a client has any unreleased locks when its connection to the server terminates, the server implicitly releases its locks. An…

MySQL Locking

Question

Which of the following statements are true regarding table locks?

Options

  • AThey can only be released by the client holding them.
  • BThey can be released by other connections than the client holding them.
  • CThey are implicitly released when the connection is closed.
  • DThey are not released when the connection is closed

How the community answered

(29 responses)
  • A
    83% (24)
  • B
    10% (3)
  • D
    7% (2)

Explanation

Explicit locks held by a client also are released if the client issues another LOCK TABLES statement. Locks cannot be maintained across connections; if a client has any unreleased locks when its connection to the server terminates, the server implicitly releases its locks. An administrator with the SUPER privilege can terminate a client connection with the KILL statement, which causes release of locks held by the client. Only the client that holds a lock acquired with LOCK TABLES can release the lock. Another client cannot release it. In other words, if you acquire a lock, it's yours until you give it up. Another client cannot force you to release it.

Topics

#table locks#lock release#connection handling#concurrency

Community Discussion

No community discussion yet for this question.

Full 1Z0-873 Practice