Oracle
1Z0-882 · Question #60
1Z0-882 Question #60: Real Exam Question with Answer & Explanation
The correct answer is C. It blocks waiting for a metadata lock until the transaction in connection 1 ends.. See the full explanation below for the reasoning.
Question
In MYSQL 5.6 you have the table t1: CREATE TABLE t1 ( id int unsigned NOT NULL PRIMARY key) ENGINE = InnoDB; There are two connections to the server. They execute in this order: Connection 1> SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; Connection 1> START TRANSACTION; Connection 1> SELECT * FROM t1 WHERE id =1; Connection 2> TRUNCATE TABLE t1; What happens to the TRUNCATE TABLE command in connection 2?
Options
- AIt immediately proceeds and causes an implicit commit of the transaction in connection1.
- BIt runs concurrently with the transaction in connection 1 as each connection has its own view of
- CIt blocks waiting for a metadata lock until the transaction in connection 1 ends.
- DIt blocks waiting for a table lock until the transaction in connection 1 ends.
Community Discussion
No community discussion yet for this question.