Brion said:
The
simultaneous edit bug occurs very rarely (maybe once every few days),
Once every few days is SERIOUSLY WAY TO OFTEN. I was worried about it
when it had happened twice ever to my knowledge... If it's happening
regularly, this must be fixed immediately.
I just made that figure up, based on Eloquence saying it's his "favorite
frequently asked question" and the vague idea that the problem would often
go unreported. If we knew how big the window was we could estimate the
frequency of occurrence.
Why not try wrapping it in a BEGIN / COMMIT block?
Transactions are
designed for exactly this kind of thing.
Oh, I thought we were still using MyISAM tables. Obviously not. Plus I was
misled by the statement in the MySQL manual that you can only do full-text
search with MyISAM tables. Do any of the languages still do it that way?
Just thinking about it... I don't think transactions will work anyway. The
problem here is delaying SELECT statements until a transaction is complete,
and transactions don't do that. Between the BEGIN statement, and the time
when the COMMIT finally acquires the locks it needs, AFAIK the problem still
occurs.
I guess if we use transactions, the edit will be saved in the old table
properly, it just won't trigger an edit conflict. It'll look like user 2
reverted user 1's work. I think I'll stick with my way for now, assuming it
works.
-- Tim Starling <tstarlingphysicsunimelbeduau>