From 2d7de5a87e1b4f5a5046161c8fd3b7f0085a5c19 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 17 Jan 2021 07:09:57 +0000 Subject: [PATCH] t/thread-index-gap: support older DBI ...by avoiding selectall_array in favor of selectall_arrayref. Tested with DBI 1.627. --- t/thread-index-gap.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/thread-index-gap.t b/t/thread-index-gap.t index f4e4bd09..83c3707d 100644 --- a/t/thread-index-gap.t +++ b/t/thread-index-gap.t @@ -45,12 +45,15 @@ for my $msgs (['orig', reverse @msgs], ['shuffle', shuffle(@msgs)]) { } $im->done; my $over = $ibx->over; - my @tid = $over->dbh->selectall_array('SELECT DISTINCT(tid) FROM over'); + my $dbh = $over->dbh; + my $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); + my @tid = map { $_->[0] } @$tid; is(scalar(@tid), 1, "only one thread initially ($desc)"); $over->dbh_close; run_script([qw(-index --reindex --rethread), $ibx->{inboxdir}]) or BAIL_OUT 'rethread'; - @tid = $over->dbh->selectall_array('SELECT DISTINCT(tid) FROM over'); + $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); + @tid = map { $_->[0] } @$tid; is(scalar(@tid), 1, "only one thread after rethread ($desc)"); } -- 2.50.0