Subject: | $sth->finish not called on create exception |
When using mysql as database, memory leak occurs when call to method
create fails due unique constraint violations. Appears to not call
$sth->finish causing a memory leak in underlying mysql library.
Example:
$hash = {unique_field => 1}:
$schema->resultset('test')->create($hash);
# Second call to create that causes leak.
$schema->resultset('test')->create($hash);
# Appears other methods may be affected too, but I'm not that familiar
with code in DBIx::Class::Storage::DBI, and perhaps I am missing something.
Thanks,
Chuck