Ticket #317: fix1.patch

File fix1.patch, 834 bytes (added by Richard Boulton, 16 years ago)

Possible fix

  • flint_database.cc

     
    754754        ++new_revision;
    755755        set_revision_number(new_revision);
    756756    } catch (const Xapian::Error &e) {
    757         // Modifications failed, and we couldn't recover successfully.
    758         throw Xapian::DatabaseError("Modifications failed (" + msg +
    759                                     "), and cannot set consistent table "
    760                                     "revision numbers: " + e.get_msg());
     757        try {
     758            // Get back into a consistent state, by reopening tables with old
     759            // revision number.
     760            open_tables(old_revision);
     761        } catch (...) {
     762            throw Xapian::DatabaseError("Modifications failed (" + msg +
     763                                        "), and cannot set consistent table "
     764                                        "revision numbers: " + e.get_msg());
     765        }
    761766    }
    762767}
    763768