]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiMailSync.pm
lei_mail_sync: debug code for uncommitted txn
[public-inbox.git] / lib / PublicInbox / LeiMailSync.pm
index d9c305800bad91bb4eab51f45e6609dec3afcc31..6120d59fd55b664bb0d519c333afbe775da72580 100644 (file)
@@ -356,4 +356,14 @@ sub forget_folder {
        $dbh->do('DELETE FROM folders WHERE fid = ?', undef, $fid);
 }
 
+# FIXME: something with "lei <up|q>" is causing uncommitted transaction
+# warnings, not sure what...
+sub DESTROY {
+       my ($self) = @_;
+       my $dbh = $self->{dbh} or return;
+       return if $dbh->{ReadOnly};
+       use Carp;
+       warn "BUG $$ $0 $self {dbh} UNCOMMITTED ", Carp::longmess();
+}
+
 1;