-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5.3
-
Component/s: Querying
-
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
}
> 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 }
-
ALL
Reproduce:
db.q.drop() db.q.insert({ "b" : [ 314159265010, 314159265001, [ 314159265000, "" ] ] }) db.q.insert({ "b" : [ 1, [ [ { } ] ], { "1" : [ false ] } ] }) db.q.insert({ "d" : { "b" : { "c" : { "b" : { "b" : { "c" : "Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together." } } } } }, "b" : [ [ ISODate("2013-09-29T00:00:00Z") ] ] }) db.q.insert({ "b" : [ { "0" : 0, "d" : { "a" : Infinity } }, [ { "d" : { "a" : { } } } ] ] }) db.q.insert({ "b" : [ [ ISODate("2008-02-29T00:00:00Z") ], "An inventor is simply a fellow who doesnt take his education too seriously." ] }) db.q.find( { "b" : { $gt : [ 0 ] } } ).itcount() db.q.find( { "b" : { $gte : [ 0 ] } } ).itcount()
2.4.5: 5 documents returned for each query
2.5.4-Pre: zero return for each query
Note:
The queries return the same results on both version (zero documents)
db.q.find( { "b" :
{ $gt : 0 } } ).itcount()
db.q.find( { "b" :
} ).itcount()
db.q.find( { "b" :
} ).itcount()
db.q.find( { "b" :
} ).itcount()
db.q.find( { "b" :
} ).itcount()
db.q.find( { "b" :
} ).itcount()
- is duplicated by
-
SERVER-11444 $lt/$lte/$gte/$gt behaves differently with array operand
- Closed