I assume you are sharing the $dbh between the threads? See Thread Tutorial, Shared Data Section
In reply to Re: DBI and threads by Grygonos in thread DBI and threads by fd15k