Lines Matching defs:db_mindex
22 * db_mindex.cc
36 #include "db_mindex.h"
51 db_mindex::db_mindex(db_scheme *how, char *tablePath) : rversion()
63 db_mindex::db_mindex() : rversion()
76 db_mindex::~db_mindex()
89 db_mindex::init(db_scheme * how)
93 FATAL("db_mindex::init: could not allocate space for scheme",
97 WARNING("db_mindex::init: empty scheme encountered");
111 FATAL("db_mindex::init: could not allocate space for indices",
124 FATAL("db_mindex::init: could not allocate space for table",
134 db_mindex::reset_tables()
138 WRITELOCKV(this, "w db_mindex::reset_tables");
146 WRITEUNLOCKV(this, "wu db_mindex::reset_tables");
156 db_mindex::satisfy_query(db_query *q, long *count, bool_t *valid) {
161 db_mindex::satisfy_query(db_query *q, long *count, bool_t *valid,
175 READLOCK(this, NULL, "r db_mindex::satisfy_query");
193 "r db_mindex::satisfy_query table");
195 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
202 "ru db_mindex::satisfy_query table");
204 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
209 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
219 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
223 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
258 READUNLOCK(this, NULL, "ru db_mindex::satisfy_query");
264 db_mindex::satisfy_query_dbonly(db_query *q, long *count,
277 WARNING("db_mindex::satisfy_query: table has no indices");
304 WARNING("db_mindex::satisfy_query: index out of range");
320 db_mindex::prepare_results(int count, db_index_entry_p res, db_status *statp)
322 READLOCK(this, NULL, "r db_mindex::prepare_results");
323 READLOCK2(table, NULL, "r table db_mindex::prepare_results", this);
329 "ru db_mindex::prepare_results: could not allocate space",
330 "ru table db_mindex::prepare_results: could not allocate space");
331 FATAL3("db_mindex::prepare_results: could not allocate space",
341 "db_mindex::prepare_results: incorrect count");
350 "ru db_mindex::prepare_results",
351 "ru db_mindex::prepare_results");
366 db_mindex::extract_index_values_from_record(entryp recnum)
384 db_mindex::extract_index_values_from_object(entry_object_p obj)
386 READLOCK(this, NULL, "r db_mindex::extract_index_values_from_object");
392 "ru db_mindex::extract_index_values_from_object");
396 "ru db_mindex::extract_index_values_from_object");
409 "ru db_mindex::extract_index_values_from_object");
412 FATAL3("db_mindex::extract: could not allocate space",
417 "ru db_mindex::extract_index_values_from_object");
427 db_mindex::first(entryp *where, entry_object ** answer)
435 * lock the db_mindex (this) before the db_table (table).
437 READLOCK(this, DB_LOCK_ERROR, "r db_mindex::first");
438 READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::first", this);
450 "ru db_mindex::first LDAP",
451 "ru table db_mindex::first LDAP");
462 "ru db_mindex::first", "ru table db_mindex::first");
473 db_mindex::next(entryp previous, entryp *where, entry_object **answer)
477 READLOCK(this, DB_LOCK_ERROR, "r db_mindex::next");
478 READLOCK2(table, DB_LOCK_ERROR, "r db_mindex::next", this);
489 "ru db_mindex::next", "ru table db_mindex::next");
516 "db_mindex::copy_result_list: could not allocate space",
529 db_mindex::reset_next(db_next_index_desc *orig)
546 db_mindex::first(db_query *q,
549 READLOCK(this, DB_LOCK_ERROR, "r db_mindex::first");
550 READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::first", this);
571 "ru db_mindex::first", "ru table db_mindex::first");
583 db_mindex::next(db_next_index_desc *previous, db_next_index_desc **where,
586 READLOCK(this, DB_LOCK_ERROR, "r db_mindex::next");
587 READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::next", this);
610 "ru db_mindex::next", "ru table db_mindex::next");
623 db_mindex::lookup(db_query *q, long *count, entry_object_p **result)
651 db_mindex::all(long *count, entry_object_p **result)
663 READLOCK(this, DB_LOCK_ERROR, "r db_mindex::all");
665 READLOCKNR(table, lret, "r table db_mindex::all");
667 READUNLOCK(this, DB_LOCK_ERROR, "ru db_mindex::all");
678 "ru table db_mindex::all LDAP");
680 "ru db_mindex::all LDAP");
693 READUNLOCKNR(table, lret, "ru table db_mindex::all");
694 READUNLOCK(this, DB_NOTFOUND, "ru db_mindex::all");
700 READUNLOCKNR(table, lret, "ru table db_mindex::all");
701 READUNLOCK(this, DB_MEMORY_LIMIT, "ru db_mindex::all");
702 FATAL3("db_mindex::all: could not allocate space",
712 WARNING("db_mindex::all: null first entry found in all");
721 "db_mindex::all: null internal entry found in all");
726 READUNLOCKNR(table, lret, "ru table db_mindex::all");
729 READUNLOCK(this, DB_SUCCESS, "ru db_mindex::all");
739 db_mindex::remove_aux(entryp recloc)
744 WRITELOCK(this, DB_LOCK_ERROR, "w db_mindex::remove_aux");
748 WRITEUNLOCK(this, DB_MEMORY_LIMIT, "wu db_mindex::remove_aux");
749 FATAL3("db_mindex::remove_aux: could not allocate space",
755 "db_mindex::remove_aux: record contains wrong number of indices");
757 "wu db_mindex::remove_aux");
815 WRITEUNLOCK(this, DB_SUCCESS, "wu db_mindex::remove_aux");
829 db_mindex::remove(db_query *q)
836 WRITELOCK(this, DB_LOCK_ERROR, "w db_mindex::remove");
837 WRITELOCK2(table, DB_LOCK_ERROR, "w table db_mindex::remove", this);
849 "wu table db_mindex::remove",
850 "wu db_mindex::remove");
854 "wu table db_mindex::remove",
855 "wu db_mindex::remove");
864 "wu table db_mindex::remove", "wu db_mindex::remove");
870 "wu table db_mindex::remove", "wu db_mindex::remove");
878 "wu table db_mindex::remove", "wu db_mindex::remove");
886 "db_mindex::remove: incorrect number of indices");
889 "wu table db_mindex::remove",
890 "wu db_mindex::remove");
898 "wu table db_mindex::remove",
899 "wu db_mindex::remove");
905 "wu table db_mindex::remove", "wu db_mindex::remove");
920 db_mindex::add(db_query *q, entry_object * obj)
927 const char *myself = "db_mindex::add";
933 WRITELOCK(this, DB_LOCK_ERROR, "w db_mindex::add");
934 WRITELOCK2(table, DB_LOCK_ERROR, "w table db_mindex::add", this);
939 "wu db_mindex::add",
940 "wu table db_mindex::add");
948 "wu db_mindex::add",
949 "wu table db_mindex::add");
964 "wu db_mindex::add DB_MEMORY_LIMIT",
965 "wu table db_mindex::add DB_MEMORY_LIMIT");
966 FATAL3("db_mindex::add: could not allocate space for",
973 "db_mindex::add: record contains wrong number of indices");
976 "wu db_mindex::add DB_INTERNAL_ERROR",
977 "wu table db_mindex::add DB_INTERNAL_ERROR");
1008 "wu db_mindex::add LDAP",
1009 "wu table db_mindex::add LDAP");
1024 "wu db_mindex::add",
1025 "wu table db_mindex::add");
1030 /* Does the actual writing to/from file specific for db_mindex structure. */
1034 return (xdr_db_mindex(x, (db_mindex*) rp));
1041 /* Transfers db_mindex structure pointed to by dp to/from file. */
1042 int transfer(db_mindex* dp)
1055 db_mindex::dump(char *file)
1071 db_mindex::reset()
1073 WRITELOCKV(this, "w db_mindex::reset");
1088 WRITEUNLOCKV(this, "wu db_mindex::reset");
1100 db_mindex::load(char *file)
1107 WRITELOCK(this, -1, "w db_mindex::load");
1179 WRITEUNLOCK(this, status, "wu db_mindex::load");
1188 db_mindex::print_stats()
1219 db_mindex::print_all_indices()
1223 READLOCKV(this, "r db_mindex::print_all_indices");
1227 READUNLOCKV(this, "ru db_mindex::print_all_indices");
1234 READUNLOCKV(this, "ru db_mindex::print_all_indices");
1239 db_mindex::print_index(int n)
1241 READLOCKV(this, "r db_mindex::print_index");
1244 READUNLOCKV(this, "ru db_mindex::print_index");