1Z0-908 · Question #19
Examine these commands and output: Which connection ID is holding the metadata lock?
The correct answer is D. 25. Connection 25 is the holder because, in the referenced output, it appears with a LOCK_STATUS = 'GRANTED' in performance_schema.metadata_locks - meaning it has successfully acquired the lock and is currently holding it, preventing other connections from proceeding. The…
Question
Examine these commands and output:
Which connection ID is holding the metadata lock?
Exhibit
Options
- A20
- B24
- C21
- D25
- E22
- F6
How the community answered
(19 responses)- B5% (1)
- C16% (3)
- D68% (13)
- E11% (2)
Explanation
Connection 25 is the holder because, in the referenced output, it appears with a LOCK_STATUS = 'GRANTED' in performance_schema.metadata_locks - meaning it has successfully acquired the lock and is currently holding it, preventing other connections from proceeding.
The distractors are wrong for the following reasons: connections like 20, 21, 22, and 24 would appear with LOCK_STATUS = 'PENDING', meaning they are waiting to acquire the lock, not holding it; connection 6 is likely visible in SHOW PROCESSLIST for an unrelated reason (e.g., idle or running a different query) and has no granted MDL entry. Only one connection can hold a granted exclusive metadata lock at a time.
Memory tip: Think "GRANTED = guilty" - the connection holding a metadata lock always shows GRANTED, while victims waiting behind it show PENDING. On the exam, scan for GRANTED first to find the blocker, then check PENDING entries for the blocked connections.
Topics
Community Discussion
No community discussion yet for this question.
