summaryrefslogtreecommitdiff
path: root/s
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-08-08 19:57:36 -0400
committerMathias Stearn <mathias@10gen.com>2011-08-08 19:57:36 -0400
commitb3204f84900ce4bba3b21902360463e4215defcd (patch)
treedc61f9ae5286ad9490c6364d7591e4da37b1988a /s
parent04261c7d15308d2b20edf61b9c8ee175f6c21ad4 (diff)
downloadmongo-b3204f84900ce4bba3b21902360463e4215defcd.tar.gz
Don't moveToFront if shardKey is _id
Diffstat (limited to 's')
-rw-r--r--s/shardkey.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/s/shardkey.cpp b/s/shardkey.cpp
index 9c19b990cf7..4699dd56ce0 100644
--- a/s/shardkey.cpp
+++ b/s/shardkey.cpp
@@ -84,7 +84,7 @@ namespace mongo {
vector<const char*> keysToMove;
keysToMove.push_back("_id");
BSONForEach(e, pattern) {
- if (strchr(e.fieldName(), '.') == NULL)
+ if (strchr(e.fieldName(), '.') == NULL && strcmp(e.fieldName(), "_id") != 0)
keysToMove.push_back(e.fieldName());
}