about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-12 09:14:48 +0000
committerEric Wong <e@80x24.org>2022-08-12 17:10:07 +0000
commita29411eeb3d4dd87225ad1a70973907e7844d7a2 (patch)
treed2de4def27a07dc647c417a5a835f966dd18ad99 /lib
parentb0e5093aa3572a86435f03edf2cbb1eb5e1a37f9 (diff)
downloadpublic-inbox-a29411eeb3d4dd87225ad1a70973907e7844d7a2.tar.gz
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")
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/POP3.pm2
1 files changed, 1 insertions, 1 deletions
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);