[SERVER-22577] mmapv1 should not allow creation of database names containing $ Created: 11/Feb/16 Updated: 05/Dec/16 Resolved: 29/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 3.3.1 |
| Fix Version/s: | 3.3.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Sprint: | TIG 12 (04/01/16) | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
This was first discovered by jonathan.abrahams in the linked ticket. When we do an insert, a DatabaseCatalogEntry is created implicitly before validating the namespace string (batch_executor.cpp). The insert would fail after the DatbaseCatalogEntry is created. For KVEngines, creating a DatabaseCatalogEntry is basically a noop (kv_storage_engine.cpp), so no harm is done. For mmapv1, a data file with an invalid name would be created in (mmap_v1_database_catalog_entry.cpp). Subsequent calls to show dbs would require getting the list of data files and this invalid one will show up. |
| Comments |
| Comment by Robert Guo (Inactive) [ 29/Mar/16 ] |
|
Users will need to drop any databases containing a "$" in the database name before upgrading to 3.3.4 or above. |
| Comment by Githook User [ 29/Mar/16 ] |
|
Author: {u'username': u'guoyr', u'name': u'Robert Guo', u'email': u'robert.guo@10gen.com'}Message: |
| Comment by J Rassi [ 22/Mar/16 ] |
|
Setting "minor change" for backwards compatibility, as databases created in this way will have to be dropped before the 3.2=>3.4 upgrade process can be started. |