in reply to DBI and threads
I assume you are sharing the $dbh between the threads? See Thread Tutorial, Shared Data Section