Exam 1z0-908 All QuestionsBrowse all questions from this exam
Question 48

t is a non-empty InnoDB table.

Examine these statements, which are executed in one session:

BEGIN;

SELECT * FROM t FOR UPDATE;

Which is true?

    Correct Answer: D

    If ANALYZE TABLE is invoked from the same session, it hangs until the transaction is committed or rolled back. This is because the SELECT * FROM t FOR UPDATE statement acquires a lock on the table. Other operations from the same session that require access to the table will have to wait until the lock is released.

Discussion
xjllllOption: C

C is right

marklvOption: D

B is not right. D is. It locks until the first connection is done.

marklv

Sorry, if same session, D will not lock. D isn't right either

FelipeKOption: C

The right answer is C