1
0
Fork 0
This commit is contained in:
Jan 2019-08-30 18:31:55 +02:00 committed by KVS85
parent e40d7fadd1
commit ad1e5d2e51
3 changed files with 46 additions and 3 deletions

View File

@ -1,7 +1,13 @@
v3.5.1 (XXXX-XX-XX) v3.5.1 (XXXX-XX-XX)
------------------- -------------------
* Fixed adding an orphan collections as the first collection in a SmartGraph. * Fixed issue #9862: ServerException: RestHandler/RestCursorHandler.cpp:279
This fixes an issue with the RocksDB primary index IN iterator not resetting its
internal iterator after being rearmed with new lookup values (which only happens
if the IN iterator is called from an inner FOR loop).
* Fixed adding an orphan collection as the first collection in a SmartGraph.
* Geo functions will now have better error reporting on invalid input. * Geo functions will now have better error reporting on invalid input.

View File

@ -207,9 +207,10 @@ class RocksDBPrimaryIndexInIterator final : public IndexIterator {
if (aap.value->isArray()) { if (aap.value->isArray()) {
_index->fillInLookupValues(_trx, *(_keys.get()), aap.value, opts.ascending, _index->fillInLookupValues(_trx, *(_keys.get()), aap.value, opts.ascending,
!_allowCoveringIndexOptimization); !_allowCoveringIndexOptimization);
_iterator = VPackArrayIterator(_keys->slice());
return true; return true;
} }
return false; return false;
} }

View File

@ -189,7 +189,43 @@ function explainSuite () {
] ]
}; };
assertEqual([ 1, 2, 3], AQL_EXECUTE(query, bindParams).json); assertEqual([ 1, 2, 3], AQL_EXECUTE(query, bindParams).json);
} },
testInIteratorJustNumeric : function () {
let query = "FOR i IN 1..10 FOR doc IN " + cn + " FILTER doc._id IN [i, i + 1] RETURN doc._key";
assertEqual([ ], AQL_EXECUTE(query).json);
},
testInIteratorString : function () {
let query = "FOR i IN 1..5 LET key = CONCAT('testkey', i) FOR doc IN " + cn + " FILTER doc._key IN [key, 'foo'] RETURN doc._key";
assertEqual(["testkey1", "testkey2", "testkey3", "testkey4", "testkey5"], AQL_EXECUTE(query).json);
},
testInIteratorStringId : function () {
let query = "FOR i IN 1..5 LET key = CONCAT('" + cn + "/testkey', i) FOR doc IN " + cn + " FILTER doc._id IN [key, 'foo'] RETURN doc._key";
assertEqual(["testkey1", "testkey2", "testkey3", "testkey4", "testkey5"], AQL_EXECUTE(query).json);
},
testInIteratorStringAndNumericReturnId : function () {
let query = "FOR i IN 1..5 LET key = CONCAT('" + cn + "/testkey', i) FOR doc IN " + cn + " FILTER doc._id IN [key, i] RETURN doc._id";
assertEqual([cn + "/testkey1", cn + "/testkey2", cn + "/testkey3", cn + "/testkey4", cn + "/testkey5"], AQL_EXECUTE(query).json);
},
testInIteratorStringAndNumeric : function () {
let query = "FOR i IN 1..5 LET key = CONCAT('" + cn + "/testkey', i) FOR doc IN " + cn + " FILTER doc._id IN [key, i] RETURN doc._key";
assertEqual(["testkey1", "testkey2", "testkey3", "testkey4", "testkey5"], AQL_EXECUTE(query).json);
},
testInIteratorStringDuplicate : function () {
let query = "FOR i IN 1..5 LET key = CONCAT('" + cn + "/testkey', i) FOR doc IN " + cn + " FILTER doc._id IN [key, key] RETURN doc._id";
assertEqual([cn + "/testkey1", cn + "/testkey2", cn + "/testkey3", cn + "/testkey4", cn + "/testkey5"], AQL_EXECUTE(query).json);
},
}; };
} }