mirror of https://gitee.com/bigwinds/arangodb
merge
This commit is contained in:
commit
dcdda8350a
|
@ -284,7 +284,7 @@ bool IndexBlock::initIndexes() {
|
|||
_currentIndex = 0;
|
||||
}
|
||||
|
||||
_cursor = createCursor();
|
||||
createCursor();
|
||||
if (_cursor->failed()) {
|
||||
THROW_ARANGO_EXCEPTION(_cursor->code);
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ bool IndexBlock::initIndexes() {
|
|||
}
|
||||
if (_currentIndex < _indexes.size()) {
|
||||
// This check will work as long as _indexes.size() < MAX_SIZE_T
|
||||
_cursor = createCursor();
|
||||
createCursor();
|
||||
if (_cursor->failed()) {
|
||||
THROW_ARANGO_EXCEPTION(_cursor->code);
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ bool IndexBlock::initIndexes() {
|
|||
}
|
||||
|
||||
/// @brief create an OperationCursor object
|
||||
std::shared_ptr<arangodb::OperationCursor> IndexBlock::createCursor() {
|
||||
void IndexBlock::createCursor() {
|
||||
DEBUG_BEGIN_BLOCK();
|
||||
IndexNode const* node = static_cast<IndexNode const*>(getPlanNode());
|
||||
auto outVariable = node->outVariable();
|
||||
|
@ -328,10 +328,10 @@ std::shared_ptr<arangodb::OperationCursor> IndexBlock::createCursor() {
|
|||
|
||||
TRI_ASSERT(_indexes.size() > _currentIndex);
|
||||
|
||||
return ast->query()->trx()->indexScanForCondition(
|
||||
_cursor.reset(ast->query()->trx()->indexScanForCondition(
|
||||
_collection->getName(), _indexes[_currentIndex], ast,
|
||||
conditionNode, outVariable, UINT64_MAX,
|
||||
Transaction::defaultBatchSize(), node->_reverse);
|
||||
Transaction::defaultBatchSize(), node->_reverse));
|
||||
DEBUG_END_BLOCK();
|
||||
}
|
||||
|
||||
|
@ -347,9 +347,9 @@ void IndexBlock::startNextCursor() {
|
|||
}
|
||||
if (_currentIndex < _indexes.size()) {
|
||||
// This check will work as long as _indexes.size() < MAX_SIZE_T
|
||||
_cursor = createCursor();
|
||||
createCursor();
|
||||
} else {
|
||||
_cursor = nullptr;
|
||||
_cursor.reset(nullptr);
|
||||
}
|
||||
DEBUG_END_BLOCK();
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ class IndexBlock : public ExecutionBlock {
|
|||
arangodb::aql::AstNode* makeUnique(arangodb::aql::AstNode*) const;
|
||||
|
||||
/// @brief create an iterator object
|
||||
std::shared_ptr<arangodb::OperationCursor> createCursor();
|
||||
void createCursor();
|
||||
|
||||
/// @brief Forwards _cursor to the next available index
|
||||
void startNextCursor();
|
||||
|
@ -134,7 +134,7 @@ class IndexBlock : public ExecutionBlock {
|
|||
/// @brief _cursor: holds the index cursor found using
|
||||
/// getIndexCursor (if any) so that it can be read in chunks and not
|
||||
/// necessarily all at once.
|
||||
std::shared_ptr<arangodb::OperationCursor> _cursor;
|
||||
std::unique_ptr<arangodb::OperationCursor> _cursor;
|
||||
|
||||
/// @brief _condition: holds the complete condition this Block can serve for
|
||||
AstNode const* _condition;
|
||||
|
|
|
@ -2754,7 +2754,7 @@ std::pair<bool, bool> Transaction::getIndexForSortCondition(
|
|||
/// calling this method
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::shared_ptr<OperationCursor> Transaction::indexScanForCondition(
|
||||
OperationCursor* Transaction::indexScanForCondition(
|
||||
std::string const& collectionName, IndexHandle const& indexId,
|
||||
arangodb::aql::Ast* ast, arangodb::aql::AstNode const* condition,
|
||||
arangodb::aql::Variable const* var, uint64_t limit, uint64_t batchSize,
|
||||
|
@ -2767,7 +2767,7 @@ std::shared_ptr<OperationCursor> Transaction::indexScanForCondition(
|
|||
|
||||
if (limit == 0) {
|
||||
// nothing to do
|
||||
return std::make_shared<OperationCursor>(TRI_ERROR_NO_ERROR);
|
||||
return new OperationCursor(TRI_ERROR_NO_ERROR);
|
||||
}
|
||||
|
||||
// Now collect the Iterator
|
||||
|
@ -2783,10 +2783,10 @@ std::shared_ptr<OperationCursor> Transaction::indexScanForCondition(
|
|||
|
||||
if (iterator == nullptr) {
|
||||
// We could not create an ITERATOR and it did not throw an error itself
|
||||
return std::make_shared<OperationCursor>(TRI_ERROR_OUT_OF_MEMORY);
|
||||
return new OperationCursor(TRI_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
return std::make_shared<OperationCursor>(
|
||||
return new OperationCursor(
|
||||
transactionContext()->orderCustomTypeHandler(), iterator.release(), limit,
|
||||
batchSize);
|
||||
}
|
||||
|
|
|
@ -558,7 +558,7 @@ class Transaction {
|
|||
/// calling this method
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::shared_ptr<OperationCursor> indexScanForCondition(
|
||||
OperationCursor* indexScanForCondition(
|
||||
std::string const& collectionName, IndexHandle const& indexId,
|
||||
arangodb::aql::Ast*, arangodb::aql::AstNode const*,
|
||||
arangodb::aql::Variable const*, uint64_t, uint64_t, bool);
|
||||
|
|
|
@ -115,8 +115,8 @@
|
|||
}
|
||||
};
|
||||
|
||||
var path = window.location.protocol + "//" +
|
||||
window.location.host + "/_db/" + database + "/_admin/aardvark/index.html";
|
||||
var path = window.location.protocol + "//" + window.location.host
|
||||
+ "/_db/" + database + "/_admin/aardvark/index.html";
|
||||
|
||||
window.location.href = path;
|
||||
|
||||
|
|
Loading…
Reference in New Issue