Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43349

Incorrect serialization for $elemMatch $not $ne

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 4.0.7, 4.2.0, 4.3.1, 3.6.15
    • Fix Version/s: 4.3.3
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0, v3.6
    • Sprint:
      Query 2019-10-21, Query 2019-11-04, Query 2019-11-18, Query 2019-12-02

      Description

      > db.test.explain().find({ "a" : { "$elemMatch" : { "$not" : { "$ne" : 400 } }}})
      {
      	"queryPlanner" : {
      		"plannerVersion" : 1,
      		"namespace" : "test.test",
      		"indexFilterSet" : false,
      		"parsedQuery" : {
      			"a" : {
      				"$elemMatch" : {
      					"0" : {
      						"" : {
      							"$not" : {
      								"$eq" : 400
      							}
      						}
      					}
      				}
      			}
      		},
      		"queryHash" : "53768594",
      		"planCacheKey" : "6A5A7DF0",
      		"winningPlan" : {
      			"stage" : "COLLSCAN",
      			"filter" : {
      				"a" : {
      					"$elemMatch" : {
      						"0" : {
      							"" : {
      								"$not" : {
      									"$eq" : 400
      								}
      							}
      						}
      					}
      				}
      			},
      			"direction" : "forward"
      		},
      		"rejectedPlans" : [ ]
      	},
      	"ok" : 1
      }
      > 
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: