问题
I'm new to PHP development and I want to create a PHP-MySQL web-app. In this app I have the case where it is possible that at the same time I might have one "UPDATE" statement and one "SELECT" query for the same row. And here is where my question appears. Does MySQL automatically lock the row when updating so the select queries will wait for it?
If yes, will the select queries wait until the update query is ready ( transaction finished) and then execute? Or will they fail and I will have to manage in the application to re issue them?
Any suggestions on how to proceed with this case?
来源:https://stackoverflow.com/questions/15872326/does-mysql-auto-lock-rows-when-updating