Ticket #12974: delete-pending-race.diff

File delete-pending-race.diff, 710 bytes (added by amb@…, 3 years ago)

Possible patch

  • mythtv/programs/mythbackend/autoexpire.cpp

    diff --git a/mythtv/programs/mythbackend/autoexpire.cpp b/mythtv/programs/mythbackend/autoexpire.cpp
    index 0c1b9e8354..0f85a74da7 100644
    a b void AutoExpire::FillDBOrdered(pginfolist_t &expireList, int expMethod) 
    980980        "SELECT recorded.chanid, starttime "
    981981        "FROM recorded "
    982982        "LEFT JOIN channel ON recorded.chanid = channel.chanid "
    983         "WHERE %1 AND deletepending = 0 "
     983        "WHERE %1 AND ( deletepending = 0 OR lastmodified <= DATE_ADD(NOW(), INTERVAL '-5' MINUTE) ) "
    984984        "ORDER BY autoexpire DESC, %2").arg(where).arg(orderby);
    985985
    986986    query.prepare(querystr);