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?
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?
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.
C is right
B is not right. D is. It locks until the first connection is done.
Sorry, if same session, D will not lock. D isn't right either
The right answer is C