summaryrefslogtreecommitdiff
path: root/jstests/core/query
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /jstests/core/query
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'jstests/core/query')
-rw-r--r--jstests/core/query/internal_strip_invalid_assignment.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/jstests/core/query/internal_strip_invalid_assignment.js b/jstests/core/query/internal_strip_invalid_assignment.js
deleted file mode 100644
index b8868c6e951..00000000000
--- a/jstests/core/query/internal_strip_invalid_assignment.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Test that '$_internalSchemaAllElemMatchFromIndex' does not use an index, and does not trigger an
- * assertion failure when we strip its index assignment from special indexes.
- *
- * Originally intended to reproduce SERVER-82717.
- *
- * @tags: [
- * # Explain command does not support read concerns other than local.
- * assumes_read_concern_local,
- * ]
- */
-(function() {
-load('jstests/libs/analyze_plan.js'); // for planHasStage
-
-const coll = db.getCollection(jsTestName());
-
-assert.commandWorked(coll.createIndex({a: 1, foo: '2dsphere'}));
-assert.commandWorked(coll.createIndex({a: 1, '$**': 'text'}));
-assert.commandWorked(coll.createIndex({a: 1}, {partialFilterExpression: {foo: 123}}));
-
-const query = {
- "$or": [
- // Has to be the same field.
- {"a": 1},
- {
- "a": {
- // Checks that ALL elements of an array match this predicate.
- // An index on {a: 1, ...} doesn't help, because:
- // - If it's multikey, each index entry only tells us one array-element, while
- // the predicate needs to check all elements.
- // - If it's non-multikey, the predicate is trivially false, because it expects
- // an array.
- "$_internalSchemaAllElemMatchFromIndex": [
- // Number of elements to skip.
- NumberLong(0),
- // Predicate to run on each element.
- {"i": {"$regex": "b"}},
- ]
- }
- }
- ]
-};
-const explain = coll.find(query).explain();
-assert(planHasStage(db, explain, "COLLSCAN"), explain);
-})();