|
xapian-core
2.0.0
|
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_defs.h"#include "glass/glass_changes.h"#include "glass/glass_dbcheck.h"#include "glass/glass_version.h"#include "honey/honey_defs.h"#include "honey/honey_dbcheck.h"#include "honey/honey_version.h"#include "backends.h"#include "databasehelpers.h"#include "filetests.h"#include "omassert.h"#include "stringutils.h"#include <ostream>#include <stdexcept>#include <string_view>
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 | 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 (string_view path, int opts, std::ostream *out) |
| static size_t | check_db_table (string_view 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 [] |
| struct { | |
| char name [9] | |
| } | honey_tables [] |
Check the consistency of a database or table.
Definition in file dbcheck.cc.
|
static |
Definition at line 124 of file dbcheck.cc.
References GlassChanges::check(), check_glass_table(), check_honey_table(), file_exists(), Xapian::Error::get_description(), GlassVersion::get_doccount(), HoneyVersion::get_doccount(), GlassVersion::get_last_docid(), HoneyVersion::get_last_docid(), GlassVersion::get_revision(), HoneyVersion::get_revision(), glass_tables, honey_tables, opts, GlassVersion::read(), HoneyVersion::read(), 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 357 of file dbcheck.cc.
References Assert, BACKEND_GLASS, BACKEND_HONEY, 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 276 of file dbcheck.cc.
References Assert, BACKEND_GLASS, BACKEND_HONEY, BACKEND_OLD, C_tolower(), check_glass_table(), check_honey_table(), DIR_SEPS, opts, p, GlassVersion::read(), and HoneyVersion::read().
Referenced by Xapian::Database::check_().
|
static |
Definition at line 94 of file dbcheck.cc.
Referenced by check_db_dir(), and check_db_fd().
|
static |
Definition at line 82 of file dbcheck.cc.
Referenced by Xapian::Database::check_().
| const { ... } glass_tables[] |
Referenced by check_db_dir(), and check_db_fd().
| const { ... } honey_tables[] |
Referenced by check_db_dir().
| char name[9] |
Definition at line 57 of file dbcheck.cc.
Referenced by Term::as_partial_query(), Terms::as_synonym_phrase_query(), Term::as_wildcarded_query(), FDTracker::check(), BackendManagerMulti::createdb_multi(), DEFINE_TESTCASE(), GlassTable::do_open_to_write(), BackendManagerHoney::finalise_generated_database(), BackendManagerSingleFile::finalise_generated_database(), BackendManagerGlass::get_compaction_output_path(), BackendManagerHoney::get_compaction_output_path(), BackendManagerMulti::get_compaction_output_path(), BackendManagerSingleFile::get_compaction_output_path(), BackendManagerHoney::get_generated_database_path(), BackendManagerSingleFile::get_generated_database_path(), Term::get_query(), Term::get_query_with_synonyms(), BackendManagerGlass::get_writable_database(), BackendManagerGlass::get_writable_database_path(), BackendManagerMulti::get_writable_database_path(), Term::make_term(), Xapian::QueryParser::Internal::parse_query(), removedir(), test_driver::runtest(), TestRunner::set_properties_for_backend(), and Xapian::Query::Internal::unserialise().