summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Rayner <adam.rayner@gmail.com>2022-02-03 22:41:07 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-03 23:36:36 +0000
commit2f4fe5d0194a4c641d9698c0f0f30b7ac2d037a0 (patch)
treeece433a03ed8a0618ad2b02321966482d12b530c
parent1bab44206a397d267dd6459666e23cf0b8931d43 (diff)
downloadmongo-2f4fe5d0194a4c641d9698c0f0f30b7ac2d037a0.tar.gz
SERVER-63256 use _sd on string literal to play nice with conditional
-rw-r--r--src/mongo/client/dbclient_base.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp
index 149dedbd063..192d3c78dd8 100644
--- a/src/mongo/client/dbclient_base.cpp
+++ b/src/mongo/client/dbclient_base.cpp
@@ -433,7 +433,7 @@ bool DBClientBase::auth(const string& dbname,
// To prevent unexpected behavior for existing clients, default to SCRAM-SHA-1 if the SASL
// negotiation does not succeeed for some reason.
- StringData mech = mechResult.isOK() ? mechResult.getValue() : "SCRAM-SHA-1";
+ StringData mech = mechResult.isOK() ? mechResult.getValue() : "SCRAM-SHA-1"_sd;
try {
const auto authParams = auth::buildAuthParams(dbname, username, password_text, mech);