* [PATCH] pop3: quiet warning for cached active statements
@ 2022-08-12 9:14 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2022-08-12 9:14 UTC (permalink / raw)
To: meta
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")
---
lib/PublicInbox/POP3.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-12 9:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 9:14 [PATCH] pop3: quiet warning for cached active statements Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).