xapian-core
1.4.26
|
Check the consistency of a database or table. More...
#include <config.h>
#include "xapian/database.h"
#include "xapian/constants.h"
#include "xapian/error.h"
#include "glass/glass_changes.h"
#include "glass/glass_dbcheck.h"
#include "glass/glass_version.h"
#include "chert/chert_database.h"
#include "chert/chert_dbcheck.h"
#include "chert/chert_types.h"
#include "chert/chert_version.h"
#include "backends.h"
#include "databasehelpers.h"
#include "filetests.h"
#include "omassert.h"
#include "stringutils.h"
#include <ostream>
#include <stdexcept>
Go to the source code of this file.
Namespaces | |
Xapian | |
The Xapian namespace contains public interfaces for the Xapian library. | |
Functions | |
static void | throw_no_db_to_check () |
static void | reserve_doclens (vector< Xapian::termcount > &doclens, Xapian::docid last_docid, ostream *out) |
static size_t | check_db_dir (const string &path, int opts, std::ostream *out) |
static size_t | check_db_table (const string &filename, int opts, std::ostream *out, int backend) |
Check a database table. More... | |
static size_t | check_db_fd (int fd, int opts, std::ostream *out, int backend) |
Check a single file DB from an fd. More... | |
static size_t | Xapian::check_stub (const string &stub_path, int opts, std::ostream *out) |
Variables | |
struct { | |
char name [9] | |
} | glass_tables [] |
Check the consistency of a database or table.
Definition in file dbcheck.cc.
|
static |
Definition at line 109 of file dbcheck.cc.
References GlassChanges::check(), check_chert_table(), check_glass_table(), CHERT_MAX_DOCID, ChertVersion::create(), Xapian::DBCHECK_FIX, file_exists(), Xapian::Error::get_description(), GlassVersion::get_doccount(), ChertDatabase::get_doccount(), GlassVersion::get_last_docid(), ChertDatabase::get_lastdocid(), GlassVersion::get_revision(), ChertDatabase::get_revision_number(), glass_tables, name, GlassVersion::read(), ChertVersion::read_and_check(), reserve_doclens(), and Xapian::Internal::str().
Referenced by Xapian::Database::check_().
|
static |
Check a single file DB from an fd.
Closes the fd.
Definition at line 349 of file dbcheck.cc.
References Assert, BACKEND_GLASS, BACKEND_UNKNOWN, check_glass_table(), close(), GlassVersion::get_doccount(), GlassVersion::get_last_docid(), GlassVersion::get_offset(), glass_tables, opts, GlassVersion::read(), and reserve_doclens().
Referenced by Xapian::Database::check_().
|
static |
Check a database table.
filename | The filename of the table (only used to get the directory and |
opts | Xapian::check() options |
out | std::ostream to write messages to (or NULL for no messages) |
backend | Backend type (a BACKEND_XXX constant) |
Definition at line 278 of file dbcheck.cc.
References Assert, BACKEND_CHERT, BACKEND_GLASS, C_tolower(), check_chert_table(), check_glass_table(), CHERT_MAX_DOCID, DIR_SEPS, opts, and GlassVersion::read().
Referenced by Xapian::Database::check_().
|
static |
Definition at line 79 of file dbcheck.cc.
Referenced by check_db_dir(), and check_db_fd().
|
static |
Definition at line 67 of file dbcheck.cc.
Referenced by Xapian::Database::check_().
const { ... } glass_tables[] |
Referenced by check_db_dir(), and check_db_fd().
char name[9] |
Definition at line 55 of file dbcheck.cc.
Referenced by Term::as_partial_query(), Term::as_wildcarded_query(), ChertTable::basic_open(), Xapian::BB2Weight::BB2Weight(), Xapian::BM25PlusWeight::BM25PlusWeight(), Xapian::BM25Weight::BM25Weight(), Xapian::BoolWeight::BoolWeight(), FDTracker::check(), check_db_dir(), ChertDatabase::compact(), Xapian::CoordWeight::CoordWeight(), BackendManagerMulti::createdb_multi(), DEFINE_TESTCASE(), Xapian::DLHWeight::DLHWeight(), GlassTable::do_open_to_write(), ChertTable::do_open_to_write(), Xapian::DPHWeight::DPHWeight(), BackendManagerSingleFile::finalise_generated_database(), BackendManagerChert::get_compaction_output_path(), BackendManagerGlass::get_compaction_output_path(), BackendManagerSingleFile::get_compaction_output_path(), BackendManagerMulti::get_compaction_output_path(), BackendManagerSingleFile::get_generated_database_path(), Xapian::PostingSource::get_maxweight(), ChertTable::get_path(), Term::get_query(), Term::get_query_with_synonyms(), BackendManagerChert::get_writable_database(), BackendManagerGlass::get_writable_database(), BackendManagerGlass::get_writable_database_path(), BackendManagerChert::get_writable_database_path(), BackendManagerMulti::get_writable_database_path(), Xapian::IfB2Weight::IfB2Weight(), Xapian::IneB2Weight::IneB2Weight(), Xapian::InL2Weight::InL2Weight(), Xapian::Weight::is_bool_weight_(), LazyWeight::LazyWeight(), Xapian::LMWeight::LMWeight(), Term::make_term(), Xapian::MatchSpy::MatchSpy(), Xapian::LatLongMetric::operator()(), Xapian::QueryParser::Internal::parse_query(), Xapian::PL2PlusWeight::PL2PlusWeight(), Xapian::PL2Weight::PL2Weight(), removedir(), test_driver::runtest(), TestRunner::set_properties_for_backend(), test_weight_class(), test_weight_class_no_params(), Xapian::TfIdfWeight::TfIdfWeight(), Xapian::ValueCountMatchSpy::top_values_end(), Xapian::TradWeight::TradWeight(), and Xapian::Query::Internal::unserialise().