Tema: Re: MySQL FIFO queue
Autorius: rl
Data: 2010-05-27 10:27:10
UPDATE Jobs
    SET InUseBy = 'Jonas'
WHERE DateCreated = (SELECT MIN(DateCreated) FROM Jobs WHERE InUseBy IS 
NULL)

1. Paleidi 2 tokius pacius update'us vienu metu
2. 1-as ivykdo (SELECT MIN(DateCreated) FROM Jobs WHERE InUseBy IS 
NULL). Gauna DateCreated  reiksme
3. 2-as ivykdo (SELECT MIN(DateCreated) FROM Jobs WHERE InUseBy IS NULL) 
gauna ta pacia DateCreated reiksme
4. 1-as uzsilockina update'inimui konkretu irasa
5. 2-as bando lockinti ta pati irasa ir laukia
6. 1-as pakeicia InUseBy = 'Jonas' ir paleidzia lock'a
7. 2-as uzsilockina irasa, pakeicia InUseBy = 'Petras' ir paleidzia.

Galima situacija?