-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: mongodb-2.6
-
Component/s: manual
-
Environment:> db.serverBuildInfo()
{
"version" : "2.5.3-pre-",
"gitVersion" : "1ea7e56cb2b8653d4b0453f04728033df34be9e1",
"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",
"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,
3,
-100
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}
> db.serverBuildInfo() { "version" : "2.5.3-pre-", "gitVersion" : "1ea7e56cb2b8653d4b0453f04728033df34be9e1", "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", "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, 3, -100 ], "javascriptEngine" : "V8", "bits" : 64, "debug" : false, "maxBsonObjectSize" : 16777216, "ok" : 1 }
Problem:
Changes in errors code for 2.4.x and 2.5.x for the same condition.
Possible just a DOC change.
Reproduce:
2.4.5
> db.t.drop() > db.t.find({ "$nor" : [ ] }) error: { "$err" : "$and/$or/$nor must be a nonempty array", "code" : 13086 }
2.5.3-pre
> db.t.drop() > db.t.find({ "$nor" : [ ] }) error: { "$err" : "bad query: BadValue $and/$or/$nor must be a nonempty array", "code" : 16810 }