mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'master' of github.com:fceller/ArangoDB
This commit is contained in:
commit
b55b22f257
|
@ -2901,40 +2901,6 @@ TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t* sim) {
|
||||||
return vector;
|
return vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief returns a description of anindex
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
TRI_index_t* TRI_IndexSimCollection (TRI_sim_collection_t* sim, TRI_idx_iid_t iid) {
|
|
||||||
TRI_index_t* idx = NULL;
|
|
||||||
size_t n;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
// .............................................................................
|
|
||||||
// inside read-lock
|
|
||||||
// .............................................................................
|
|
||||||
|
|
||||||
TRI_READ_LOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
|
||||||
|
|
||||||
n = sim->_indexes._length;
|
|
||||||
|
|
||||||
for (i = 0; i < n; ++i) {
|
|
||||||
idx = sim->_indexes._buffer[i];
|
|
||||||
|
|
||||||
if (idx->_iid == iid) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TRI_READ_UNLOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
|
||||||
|
|
||||||
// .............................................................................
|
|
||||||
// outside read-lock
|
|
||||||
// .............................................................................
|
|
||||||
|
|
||||||
return i < n ? idx : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief drops an index
|
/// @brief drops an index
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -4407,10 +4373,7 @@ TRI_index_t* TRI_EnsurePriorityQueueIndexSimCollection(TRI_sim_collection_t* sim
|
||||||
|
|
||||||
TRI_WRITE_LOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
TRI_WRITE_LOCK_DOCUMENTS_INDEXES_SIM_COLLECTION(sim);
|
||||||
|
|
||||||
// .............................................................................
|
|
||||||
// Given the list of attributes (as strings)
|
// Given the list of attributes (as strings)
|
||||||
// .............................................................................
|
|
||||||
|
|
||||||
idx = CreatePriorityQueueIndexSimCollection(sim, attributes, 0, unique, created);
|
idx = CreatePriorityQueueIndexSimCollection(sim, attributes, 0, unique, created);
|
||||||
|
|
||||||
if (idx == NULL) {
|
if (idx == NULL) {
|
||||||
|
|
|
@ -351,12 +351,6 @@ int TRI_CloseSimCollection (TRI_sim_collection_t* collection);
|
||||||
|
|
||||||
TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t*);
|
TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t*);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief returns a description of an index
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
TRI_index_t* TRI_IndexSimCollection (TRI_sim_collection_t*, TRI_idx_iid_t);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief drops an index
|
/// @brief drops an index
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue