List:General Discussion« Previous MessageNext Message »
From:Frederik Lindberg Date:January 1 1970 12:00am
Subject:Re: MySQL and web-concurrency?
View as plain text  
On Wed, 5 May 1999, Eric Handbury wrote:

>   I am implementing a web-server with the SQL-engine being MySQL. Since all
> web transactions are state-less, how do developers resolve the concurrency
> issue where two people are trying to update the same record? Since each of
> the two people have their own copies of the current data, won't one of them
> clobber the others data?

Depends on the data. You can merge the data (i.e. #1 subtracts 50, #2
subtracts 50, you just do them consecutively) or you can deny update when
data has changed (#2 sends back both old and new data and if the database
doesn't match "old", the updated is refused and the client is shown the
current state of the db).

-Sincerely, Fred

Fred Lindberg, Inf. Dis., WashU, St. Louis, MO, USA

MySQL and web-concurrency?Eric Handbury5 May
  • Re: MySQL and web-concurrency?Frederik Lindberg5 May
  • Re: MySQL and web-concurrency?Fred Read5 May