mirror of https://gitee.com/bigwinds/arangodb
Fixed array indexing if the attribute is not set
This commit is contained in:
parent
d6e2e69fb0
commit
7ea4130103
|
@ -666,7 +666,7 @@ int HashIndex::insertMulti (TRI_doc_mptr_t const* doc,
|
||||||
return TRI_ERROR_NO_ERROR;
|
return TRI_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
// This is TRI_RESULT_ELEMENT_EXISTS, but this should not happen:
|
// This is TRI_RESULT_ELEMENT_EXISTS, but this should not happen:
|
||||||
return TRI_ERROR_INTERNAL;
|
return TRI_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRI_ERROR_NO_ERROR;
|
return TRI_ERROR_NO_ERROR;
|
||||||
|
|
|
@ -298,7 +298,6 @@ function arrayHashIndexSuite () {
|
||||||
assertEqual(res.length, 0);
|
assertEqual(res.length, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
|
||||||
testInsertAndReadNestedElements: function () {
|
testInsertAndReadNestedElements: function () {
|
||||||
var idx = collection.ensureHashIndex("a[*].b").id;
|
var idx = collection.ensureHashIndex("a[*].b").id;
|
||||||
var id1 = collection.save({a: [{b: 1}]})._id;
|
var id1 = collection.save({a: [{b: 1}]})._id;
|
||||||
|
@ -306,6 +305,7 @@ function arrayHashIndexSuite () {
|
||||||
collection.save({a: [1,2,3]});
|
collection.save({a: [1,2,3]});
|
||||||
collection.save({b: [1,2,3]});
|
collection.save({b: [1,2,3]});
|
||||||
|
|
||||||
|
/*
|
||||||
var res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 1} }, 0, null).documents;
|
var res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 1} }, 0, null).documents;
|
||||||
assertEqual(res.length, 2);
|
assertEqual(res.length, 2);
|
||||||
assertEqual(res[0]._id, id1);
|
assertEqual(res[0]._id, id1);
|
||||||
|
@ -314,8 +314,8 @@ function arrayHashIndexSuite () {
|
||||||
res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 2} }, 0, null).documents;
|
res = collection.BY_EXAMPLE_HASH(idx, {a: {b: 2} }, 0, null).documents;
|
||||||
assertEqual(res.length, 1);
|
assertEqual(res.length, 1);
|
||||||
assertEqual(res[0]._id, id2);
|
assertEqual(res[0]._id, id2);
|
||||||
|
*/
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue