]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Msgmap.pm
Merge remote-tracking branch 'origin/email-simple-mem' into master
[public-inbox.git] / lib / PublicInbox / Msgmap.pm
index 0035c9e3dc1ad8ff5bad1d3201ab06ecf9105032..5a89b85a51e297660291f0c4e5477bd2865608da 100644 (file)
@@ -126,9 +126,9 @@ sub mid_insert {
        my ($self, $mid) = @_;
        my $dbh = $self->{dbh};
        my $sth = $dbh->prepare_cached(<<'');
-INSERT OR IGNORE INTO msgmap (mid) VALUES (?)
+INSERT INTO msgmap (mid) VALUES (?)
 
-       return if $sth->execute($mid) == 0;
+       return unless eval { $sth->execute($mid) };
        my $num = $dbh->last_insert_id(undef, undef, 'msgmap', 'num');
        $self->num_highwater($num) if defined($num);
        $num;