Examine these entries from the general query log: All UPDATE statements reference existing rows. Which describes the outcome of the sequence of statements?
A.
Connection 24 experiences a lock wait timeout.
B.
Connection 25 experiences a lock wait timeout.
C.
A deadlock occurs immediately.
D.
All statements execute without error.
E.
A deadlock occurs after innodb_lock_wait_timeout seconds.
root@localhost[world]> update t2 set val=42 where id =3805;
ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 900 |
+--------------------------+-------+
correction, 24 and 25 hit the same id, an started a transaction. B and C are correct except b is NOT correct if 24 commits before timeout. So C happens. And C happens because the updates happen BEFORE 24 commits.
I see I didn't say the answer. No commit is ever executed, so the transactions are in limbo. So E is the correct answer. Eventually a timeout will occur. Auto commit does not matter when you begin a transaction. Both connections hit the same row, and are not committed, so there are lock.
Auto-commit not been disabled hence it should be able to execute all
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.1z0-908 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
abpg
6 months, 1 week agoFelipeK
1 year, 6 months agomarklv
1 year, 7 months agomarklv
1 year, 5 months agomarklv
10 months, 1 week agoDhanushka
1 year, 10 months ago