diff options
author | Jason Rassi <rassi@10gen.com> | 2015-11-02 14:04:16 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-11-05 13:56:56 -0500 |
commit | e2cbe3c873fa2f989e5c2b811b1757ac0f2095e3 (patch) | |
tree | 973d62ef29e235ce2e6208d1bd64477a75c53b58 /src/mongo/db/commands/current_op.cpp | |
parent | 3b76b83742bcd2124abe38718ad5c68bd72b2fc8 (diff) | |
download | mongo-e2cbe3c873fa2f989e5c2b811b1757ac0f2095e3.tar.gz |
SERVER-19510 ExtensionsCallbackReal ctor take ptr to NamespaceString
Diffstat (limited to 'src/mongo/db/commands/current_op.cpp')
-rw-r--r-- | src/mongo/db/commands/current_op.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp index cd21548445f..224105b4ce4 100644 --- a/src/mongo/db/commands/current_op.cpp +++ b/src/mongo/db/commands/current_op.cpp @@ -98,8 +98,12 @@ public: filter = b.obj(); } - const ExtensionsCallbackReal extensionsCallback(txn, db); - const Matcher matcher(filter, extensionsCallback); + // We use ExtensionsCallbackReal here instead of ExtensionsCallbackNoop in order to support + // the use case of having a $where filter with currentOp. However, since we don't have a + // collection, we pass in a fake collection name (and this is okay, because $where parsing + // only relies on the database part of the namespace). + const NamespaceString fakeNS(db, "$cmd"); + const Matcher matcher(filter, ExtensionsCallbackReal(txn, &fakeNS)); BSONArrayBuilder inprogBuilder(result.subarrayStart("inprog")); |