From: Eric Wong Date: Fri, 12 Aug 2022 09:14:48 +0000 (+0000) Subject: pop3: quiet warning for cached active statements X-Git-Tag: v1.9.0~19 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a29411eeb3d4dd87225ad1a70973907e7844d7a2;p=public-inbox.git pop3: quiet warning for cached active statements Setting the $if_active parameter of ->prepare_cached to `1' seemed to be the best option many years ago, so it's probably the best option going forward when caching prepared statements. Fixes: cab36ebd00ca72f8 ("pop3: remove untouched rows on QUIT/disconnect") --- diff --git a/lib/PublicInbox/POP3.pm b/lib/PublicInbox/POP3.pm index 82df257c..bd7dfc65 100644 --- a/lib/PublicInbox/POP3.pm +++ b/lib/PublicInbox/POP3.pm @@ -303,7 +303,7 @@ sub __cleanup_state { $self->{pop3d}->{-state_dbh}->prepare_cached(<<'')->execute($txn_id); DELETE FROM deletes WHERE txn_id = ? AND uid_dele = -1 - my $sth = $self->{pop3d}->{-state_dbh}->prepare_cached(<<''); + my $sth = $self->{pop3d}->{-state_dbh}->prepare_cached(<<'', undef, 1); SELECT COUNT(*) FROM deletes WHERE user_id = ? $sth->execute($user_id);