May 19th, 2001

I suck.

Sorry for wasting many people's time that would have otherwise been spent sleeping.

This fixes the infinite loop that was eating up CPU and memory and crashing machines when they ran out of swap.

I wasn't trusting user input here ... I already validated their opts at another place, but in this case $q->{'opts'} was NULL, which is mapped to "undef" by DBI, so from, to, and by were all zero in numeric context. I got paranoid though and added the $by > 0 and int($by) checks... all that should be necessary is unless ($by).

Collapse )