2 # Copyright (C) all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # unstable dev script, chasing a bug which may be in LeiSavedSearch->is_dup
7 use PublicInbox::OverIdx;
8 @ARGV == 1 or die "Usage: $0 /path/to/over.sqlite3\n";
9 my $over = PublicInbox::OverIdx->new($ARGV[0]);
11 $dbh->do('PRAGMA mmap_size = '.(2 ** 48));
13 my ($err, $none, $nr, $ids);
14 $Data::Dumper::Useqq = $Data::Dumper::Sortkeys = 1;
16 $ids = $over->ids_after(\$num);
19 my $smsg = $over->get_art($n);
21 warn "#$n article missing\n";
25 my $exp = $smsg->{blob};
27 ++$none if $smsg->{bytes};
30 my $xr3 = $over->get_xref3($n, 1);
33 $r->[2] = unpack('H*', $r->[2]);
34 $found = 1 if $r->[2] eq $exp;
37 warn Dumper([$smsg, $xr3 ]);
42 warn "$none/$nr had no blob (external?)\n" if $none;
43 warn "$err errors\n" if $err;