MySQL 8.0 Database Administrator — Question 68
You encountered an insufficient privilege error in the middle of a long transaction.
The database administrator is informed and immediately grants the required privilege:
GRANT UPDATE ON world.city TO ‘user1’;
How can you proceed with your transaction with the least interruption?
Answer options
- A. Roll back the transaction and start the transaction again in the same session.
- B. Re-execute the failed statement in your transaction.
- C. Change the default database and re-execute the failed statement in your transaction.
- D. Close the connection, reconnect, and start the transaction again.
Correct answer: B
Explanation
The correct answer is B because once the privilege is granted, you can simply re-execute the failed statement without needing to start the transaction over. Options A, C, and D introduce unnecessary interruptions or changes that could complicate the process instead of allowing a smooth continuation.