Today's WTF

Tim Sweetman ti at lemonia.org
Thu Nov 15 08:52:28 GMT 2007


Toby Corkindale wrote:

>On Thu, Nov 15, 2007 at 12:32:08PM +1100, Toby Corkindale wrote:
>[snip]
>  
>
>>2) if the DB updates fast enough, $rowsReturned may jump more than one row per
>>iteration, and once $rowsReturned is > $rowsToCollect, the LOOP NEVER ENDS. In
>>which case it won't just be the DBA after your head.
>>    
>>
>
>Whoops. It has a LIMIT clause on the SQL, so actually it will eventually
>terminate.
>
>But I still think it's crack-fuelled.
>  
>
It would still be considered desirable to use >=, rather than ==, to 
avoid the possibility of an endless busy loop if the code is changed, 
but, aside from that, where is the crack here?

See also http://en.wikipedia.org/wiki/Talk:Database_as_an_IPC

ti'



More information about the london.pm mailing list