MySQL Forums
Forum List  »  Newbie

Re: update a row
Posted by: Peter Brawley
Date: December 03, 2018 12:51PM

It's called concurrency. Database servers can't see into client input buffers, much less manipulate them, so RDBMSs use transactions to turn edit events into uncorruptible or at least error-recoverable action sequences.

It requires the transactional storage engine InnoDB. There are two main approaches, optimistic and pessimistic.

Optimistic relies on the likelihood that it's rare for two users to try to change the same row at exactly the same time; usually there's a bit of a time diff, so the first edit will usually be done before the second starts. Against the possibility of a collision, graceful rollback logic and retry logic are coded into the transaction.

Pessimistic concurrency codes against the likelihood of such collisions, so necessarily it's less convenient, more intrusive.

For details see https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-model.html



Edited 1 time(s). Last edit at 12/03/2018 12:51PM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
December 03, 2018 01:45AM
Re: update a row
December 03, 2018 12:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.