[SERVER-11436] indexed query with {$lt: ''} causes assertion Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 20/Nov/13

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.5.3
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: 26qa, nqf, query_triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

> db.serverBuildInfo()
{
"version" : "2.5.4-pre-",
"gitVersion" : "d8ca8b5faa1447365403cfb8da16a041e7d31d95",
"OpenSSLVersion" : "",
"sysInfo" : "Darwin vero 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load -mmacosx-version-min=10.6",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wno-unknown-pragmas -Winvalid-pch -pipe -O3 -Wno-unused-function -Wno-deprecated-declarations -mmacosx-version-min=10.6",
"allocator" : "tcmalloc",
"versionArray" : [
2,
5,
4,
-100
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}


Attachments: File server11436.js    
Issue Links:
Related
Operating System: ALL
Participants:

 Description   

Problem:
Creating a unique index causes an assert on 2.5.4-Pre

Reproduce:

db.q.drop()
db.q.insert({b:1})
db.q.ensureIndex( { b: 1 }, { unique: true } )
db.q.find( { "b" : { $lt : "" } } )
error: { "$err" : "assertion src/mongo/db/query/query_planner.cpp:416" }

On 2.4.5, this executes with issue.



 Comments   
Comment by Githook User [ 20/Nov/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-11436 fixed incorrect bounds for {$lt: min} and {$gt: max} expressions
Branch: master
https://github.com/mongodb/mongo/commit/99cd81c29e4c9a77c50ffa7c8dd6bcb3c1c93945

Comment by hari.khalsa@10gen.com [ 04/Nov/13 ]

I cannot repro on master...

Generated at Thu Feb 08 03:25:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.