1
0
Fork 0

Merge branch 'spdvpk' of https://github.com/arangodb/arangodb into spdvpk

This commit is contained in:
Jan Steemann 2016-02-25 15:34:32 +01:00
commit efc2b26643
3 changed files with 0 additions and 68 deletions

View File

@ -192,38 +192,6 @@ HashIndex::MultiArray::~MultiArray() {
delete _isEqualElElByKey; delete _isEqualElElByKey;
} }
////////////////////////////////////////////////////////////////////////////////
/// @brief create an index search value
////////////////////////////////////////////////////////////////////////////////
TRI_hash_index_search_value_t::TRI_hash_index_search_value_t()
: _length(0), _values(nullptr) {}
TRI_hash_index_search_value_t::~TRI_hash_index_search_value_t() { destroy(); }
void TRI_hash_index_search_value_t::reserve(size_t n) {
TRI_ASSERT(_values == nullptr);
_values = static_cast<TRI_shaped_json_t*>(
TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, n * sizeof(TRI_shaped_json_t), true));
if (_values == nullptr) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
}
_length = n;
}
void TRI_hash_index_search_value_t::destroy() {
if (_values != nullptr) {
for (size_t i = 0; i < _length; ++i) {
TRI_DestroyShapedJson(TRI_UNKNOWN_MEM_ZONE, &_values[i]);
}
TRI_Free(TRI_UNKNOWN_MEM_ZONE, _values);
_values = nullptr;
}
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief create the index /// @brief create the index
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -42,21 +42,6 @@
/// @brief hash index query parameter /// @brief hash index query parameter
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
struct TRI_hash_index_search_value_t {
TRI_hash_index_search_value_t();
~TRI_hash_index_search_value_t();
TRI_hash_index_search_value_t(TRI_hash_index_search_value_t const&) = delete;
TRI_hash_index_search_value_t& operator=(
TRI_hash_index_search_value_t const&) = delete;
void reserve(size_t);
void destroy();
size_t _length;
struct TRI_shaped_json_s* _values;
};
namespace arangodb { namespace arangodb {
class HashIndex; class HashIndex;
@ -65,24 +50,6 @@ class Transaction;
class HashIndexIterator final : public IndexIterator { class HashIndexIterator final : public IndexIterator {
public: public:
#if 0
////////////////////////////////////////////////////////////////////////////////
/// @brief Construct an HashIndexIterator based on hash_index_search_value_t
/// DEPRECATED
////////////////////////////////////////////////////////////////////////////////
HashIndexIterator(arangodb::Transaction* trx, HashIndex const* index,
std::vector<TRI_hash_index_search_value_t*>& keys)
: _trx(trx),
_index(index),
_keys(keys),
_position(0),
_buffer(),
_posInBuffer(0) {
_numLookups = keys.size();
}
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief Construct an HashIndexIterator based on VelocyPack /// @brief Construct an HashIndexIterator based on VelocyPack
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -1159,9 +1159,6 @@ static void ByExampleHashIndexQuery(
TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_NO_INDEX); TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_NO_INDEX);
} }
// convert the example (index is locked by lockRead)
TRI_hash_index_search_value_t searchValue;
{ {
std::string errorMessage; std::string errorMessage;
// HACKI int res = SetupSearchValue(hashIndex->paths(), example, shaper, searchValue, // HACKI int res = SetupSearchValue(hashIndex->paths(), example, shaper, searchValue,