-
Type:
Bug
-
Resolution: Done
-
Priority:
Minor - P4
-
Affects Version/s: 3.3.3
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
ALL
-
TIG 13 (04/22/16)
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Validation for namespace strings are currently scattered throughout the codebase, some of which make incorrect assumptions. We should encapsulate the checks by having them call methods on NamespaceString.
Here's a few of them:
➜ mongo git:(master) ✗ ack "find\('\\\$'\)" db/catalog/collection.cpp 208: if (_ns.ns().find('$') != string::npos) { db/dbcommands.cpp 473: if (nsToDrop.find('$') != string::npos) { db/query/get_executor.cpp 650: if (nss.ns().find('$') != string::npos) { db/storage/mmap_v1/record_store_v1_base.cpp 259: if (delRecLength >= 32 * 1024 && _ns.find('$') != string::npos && !isCapped()) {