diff options
Diffstat (limited to 'src/mongo/db/s/config/configsvr_shard_collection_command.cpp')
-rw-r--r-- | src/mongo/db/s/config/configsvr_shard_collection_command.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index cbbcee65059..30824550e1e 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -353,7 +353,7 @@ void validateShardKeyAgainstExistingIndexes(OperationContext* opCtx, } else { bool isExplicitlyUnique = eqQueryResult["unique"].trueValue(); BSONObj currKey = eqQueryResult["key"].embeddedObject(); - bool isCurrentID = str::equals(currKey.firstElementFieldName(), "_id"); + bool isCurrentID = (currKey.firstElementFieldNameStringData() == "_id"); uassert(ErrorCodes::InvalidOptions, str::stream() << "can't shard collection " << nss.ns() << ", " << proposedKey << " index not unique, and unique index explicitly specified", |