[SERVER-38066] Shell utils should open files in binary mode Created: 09/Nov/18  Updated: 29/Oct/23  Resolved: 20/Nov/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.5, 4.1.6

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-12220 Docs for SERVER-38066: Shell utils sh... Closed
Related
related to SERVER-38065 Disable wt_repair_corrupt_metadata on... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-11-19, Storage NYC 2018-12-03
Participants:
Linked BF Score: 91

 Description   

The shell helpers for reading files, cat(), and writing files, writeFile() do not open files in binary mode,  ios::binary. On Windows, this results in \n characters being translated as \r\n.

If the WiredTiger.turtle file is opened with cat() and written with writeFile(), WiredTiger will be unable to read it because it does not recognize \r characters.



 Comments   
Comment by Githook User [ 26/Nov/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-38066 Shell utils should allow files to be opened in binary mode

(cherry picked from commit e768373f878c43100c023565c01ed16ad810ad1b)
Branch: v4.0
https://github.com/mongodb/mongo/commit/7e345a77bc19db3779dd57a4f54b9a638471bb26

Comment by Githook User [ 20/Nov/18 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-38066 Shell utils should allow files to be opened in binary mode
Branch: master
https://github.com/mongodb/mongo/commit/e768373f878c43100c023565c01ed16ad810ad1b

Generated at Thu Feb 08 04:47:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.