about summary refs log tree commit homepage
path: root/t/v2writable.t
diff options
authorEric Wong <e@yhbt.net>2020-08-26 08:17:40 +0000
committerEric Wong <e@yhbt.net>2020-08-27 10:57:26 +0000
commitb61b55643c617403f8d141cfe9bff22ad47913f7 (patch)
treeb8e311bce7a3558a4354a107d51bb09929a41a7b /t/v2writable.t
parent22e7956e56f3a63479b894af0ee4812ff7ae025a (diff)
As noted in commit 87dca6d8d5988c5eb54019cca342450b0b7dd6b7
("www: rework query responses to avoid COUNT in SQLite"),
COUNT on many rows is expensive on big SQLite DBs.

We've already stopped using that code path long ago in WWW
while -imapd and -nntpd never used it.  So we'll adjust our
remaining test cases to not need it, either.
Diffstat (limited to 't/v2writable.t')
1 files changed, 3 insertions, 1 deletions
diff --git a/t/v2writable.t b/t/v2writable.t
index 2bd7a400..9e4547ba 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -120,7 +120,9 @@ if ('ensure git configs are correct') {
         $mime->header_set('References', '<zz-mid@b>');
         ok($im->add($mime), 'message with multiple Message-ID');
-        my ($total, undef) = $ibx->over->recent;
+        my $total = $ibx->over->dbh->selectrow_array(<<'');
+SELECT COUNT(*) FROM over WHERE num > 0
         is($ibx->mm->num_highwater, $total, 'got expected highwater value');
         my $srch = $ibx->search;
         my $mset1 = $srch->reopen->query('m:abcde@1', { mset => 1 });