search

Home  >  Q&A  >  body text

Please take a look at mysql exclusive lock problem

1646107009(1).jpg

Please help me. Doesn’t it mean that when the exclusive lock does not commit the transaction, this data cannot be queried in other places? Why does it have no effect? ​​I opened two query editor windows and both are Same code, no transaction is submitted after the first query, why can the other query still be performed? Shouldn’t the exclusive lock be blocked from other queries when the first transaction is not submitted? I don’t understand. I followed the video I practiced in the tutorial, but the video tutorial shows that the exclusive lock is effective, but mine is not effective, please help! !

START TRANSACTION

SELECT * from `article` where id = 2 for update;

COMMIT

何惜一博何惜一博1002 days ago1169

reply all(0)I'll reply

No reply
  • Cancelreply