xapian-core  1.4.21
Namespaces | Functions | Variables
dbcheck.cc File Reference

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>
+ Include dependency graph for dbcheck.cc:

Go to the source code of this file.

Namespaces

 Xapian
 The Xapian namespace contains public interfaces for the Xapian library.
 

Functions

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 []
 

Detailed Description

Check the consistency of a database or table.

Definition in file dbcheck.cc.

Function Documentation

◆ check_db_dir()

static size_t check_db_dir ( const string &  path,
int  opts,
std::ostream *  out 
)
static

◆ check_db_fd()

static size_t check_db_fd ( int  fd,
int  opts,
std::ostream *  out,
int  backend 
)
static

◆ check_db_table()

static size_t check_db_table ( const string &  filename,
int  opts,
std::ostream *  out,
int  backend 
)
static

Check a database table.

Parameters
filenameThe filename of the table (only used to get the directory and
optsXapian::check() options
outstd::ostream to write messages to (or NULL for no messages)
backendBackend type (a BACKEND_XXX constant)

Definition at line 270 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_().

◆ reserve_doclens()

static void reserve_doclens ( vector< Xapian::termcount > &  doclens,
Xapian::docid  last_docid,
ostream *  out 
)
static

Definition at line 71 of file dbcheck.cc.

Referenced by check_db_dir(), and check_db_fd().

Variable Documentation

◆ glass_tables

const { ... } glass_tables[]
Initial value:
= {
{ "docdata" },
{ "termlist" },
{ "postlist" },
{ "position" },
{ "spelling" },
{ "synonym" }
}

Referenced by check_db_dir(), and check_db_fd().

◆ name

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(), Xapian::DLHWeight::DLHWeight(), GlassTable::do_open_to_write(), ChertTable::do_open_to_write(), Xapian::DPHWeight::DPHWeight(), BackendManagerSingleFile::get_compaction_output_path(), BackendManagerChert::get_compaction_output_path(), BackendManagerGlass::get_compaction_output_path(), BackendManagerMulti::get_compaction_output_path(), Xapian::PostingSource::get_maxweight(), ChertTable::get_path(), Term::get_query(), Term::get_query_with_synonyms(), BackendManagerChert::get_writable_database(), BackendManagerGlass::get_writable_database(), BackendManagerChert::get_writable_database_path(), BackendManagerGlass::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(), Xapian::TfIdfWeight::TfIdfWeight(), Xapian::ValueCountMatchSpy::top_values_end(), Xapian::TradWeight::TradWeight(), and Xapian::Query::Internal::unserialise().