Skip to content

Instantly share code, notes, and snippets.

View Fufelschmerz's full-sized avatar
🎯
Focusing

Dmitry Stepanov Fufelschmerz

🎯
Focusing
View GitHub Profile
Thread Tx(1) Tx(2) Comment
Step 1 BEGIN; BEGIN; Start of transactions
Step 2 SELECT * FROM users WHERE id = 3 FOR NO KEY UPDATE;
Flow Tx(1) Tx(2) Comment
Step 1 BEGIN; BEGIN; Start of transactions
Step 2 SELECT * FROM users WHERE id = 1 FOR UPDATE; Fetch and lock the row for update in the users table. Id = 1
Step 3