1
0
Fork 0

fixed issue #10062: AQL: Could not extract custom attribute (#10067)

This commit is contained in:
Jan 2019-09-27 14:15:39 +02:00 committed by KVS85
parent da4fb1e821
commit 7b427a549d
4 changed files with 33 additions and 2 deletions

View File

@ -1,6 +1,8 @@
v3.5.1 (XXXX-XX-XX)
-------------------
* Fixed issue #10062: AQL: could not extract custom attribute.
* Fix compilation issue with clang 10.
* Fixed error message for error 1928 ("not in orphan") to "collection is

View File

@ -5998,8 +5998,9 @@ AqlValue Functions::Append(ExpressionContext* expressionContext, transaction::Me
return AqlValue(AqlValueHintNull());
}
auto options = trx->transactionContextPtr()->getVPackOptions();
std::unordered_set<VPackSlice, basics::VelocyPackHelper::VPackHash, basics::VelocyPackHelper::VPackEqual> added(
11, basics::VelocyPackHelper::VPackHash(), basics::VelocyPackHelper::VPackEqual());
11, basics::VelocyPackHelper::VPackHash(), basics::VelocyPackHelper::VPackEqual(options));
transaction::BuilderLeaser builder(trx);
builder->openArray();

View File

@ -2057,7 +2057,8 @@ function inspectDump(filename, outfile) {
for (let i = keys.length; i > 0; --i) {
let collection = keys[i - 1];
let details = data.collections[collection];
if (details.name[0] === '_') {
let name = details.name || collection;
if (name[0] === '_') {
// system collection
print("try { db._drop(" + JSON.stringify(collection) + ", true); } catch (err) { print(String(err)); }");
} else {

View File

@ -859,11 +859,38 @@ function ahuacatlListTestSuite () {
};
}
function ahuacatlDocumentAppendTestSuite () {
var collectionName = "UnitTestList";
var collection;
return {
setUpAll : function () {
internal.db._drop(collectionName);
collection = internal.db._create(collectionName);
},
tearDownAll: function () {
internal.db._drop(collectionName);
},
testAppendWithDocuments : function () {
for (let i = 0; i < 2000; ++i) {
collection.insert({ _key: "test" + i, value: i });
}
let query = "LET results = APPEND((FOR doc IN " + collectionName + " FILTER doc.value < 1000 RETURN doc), (FOR doc IN " + collectionName + " FILTER doc.value >= 500 RETURN doc), true) FOR doc IN results SORT doc.updated LIMIT 2000 RETURN doc";
assertEqual(2000, getQueryResults(query).length);
}
};
}
////////////////////////////////////////////////////////////////////////////////
/// @brief executes the test suite
////////////////////////////////////////////////////////////////////////////////
jsunity.run(ahuacatlListTestSuite);
jsunity.run(ahuacatlDocumentAppendTestSuite);
return jsunity.done();