summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 51016d486ce..2af0907170d 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -266,10 +266,12 @@ void CurOp::ensureStarted() {
}
}
-void CurOp::enter_inlock(const char* ns, int dbProfileLevel) {
+void CurOp::enter_inlock(const char* ns, boost::optional<int> dbProfileLevel) {
ensureStarted();
_ns = ns;
- raiseDbProfileLevel(dbProfileLevel);
+ if (dbProfileLevel) {
+ raiseDbProfileLevel(*dbProfileLevel);
+ }
}
void CurOp::raiseDbProfileLevel(int dbProfileLevel) {