1z0-908 Exam QuestionsBrowse all questions from this exam

1z0-908 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?

Show Answer
Correct Answer: B,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

3 comments
Sign in to comment
marklvOption: D
Sep 2, 2023

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

marklv
Jul 15, 2024

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

xjllllOption: C
Dec 17, 2023

C is right

FelipeKOption: C
Jan 24, 2024

The right answer is C