Transactions, Incrementing, and MySQL UPDATEAsked by kasia k cik z ksi k
Is an increment operation in UPDATE transaction-safe in MySQL? Is it possible to race when multiple clients simultaneously perform a query like “UPDATE mytable SET myfield = myfield + 1 WHERE id = myid”? If a thousand clients simultaneously execute such a query on a line with a base value of 0, will the value be a thousand at the end?
Speech about InnoDB.
Why all this garden if such a simple thing would not work. - ms bayer
The record is blocked, update is executed and then you can only continue to work with this record. In principle, because of this, in some articles on optimization and reduction of server load, it is recommended not to use the update frequently