[SERVER-8297] Remove three argument constructor from the V8 version of BinData Created: 23/Jan/13  Updated: 11/Jul/16  Resolved: 11/Feb/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4.0-rc1

Type: Bug Priority: Major - P3
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-8706 Wrong BinData written with mongoimport Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

The V8 version of BinData accepts BinData( length, type, string ), which is not a feature of the SpiderMonkey version of BinData. This variation stores 'length' bytes of binary data copied directly from 'string', even if 'string' holds fewer than 'length' bytes of data, with the additional bytes copied from the memory locations that follow 'string'.

This three-argument variation should be removed to match the old feature set and the documentation.



 Comments   
Comment by auto [ 11/Feb/13 ]

Author:

{u'date': u'2013-02-11T16:05:08Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-8297 SERVER-8495 Remove 3-argument BinData constructor and callers

Remove undocumented overload of the BinData constructor, and its
internal callers. Do not convert binary data to UTF-8 when calling
BinData constructor internally.
Branch: master
https://github.com/mongodb/mongo/commit/0e0b5016ab80630666277790adbd8042b2c5bb68

Comment by Tad Marshall [ 02/Feb/13 ]

Our internal code was using the 3-argument constructor, so it can't be removed without changing the code that was using it. It should not be externally visible to users, since it is undocumented and is not supposed to be part of the API, but the previous commit was incomplete and broke functionality (and tests).

Comment by auto [ 02/Feb/13 ]

Author:

{u'date': u'2013-02-02T15:33:23Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: Revert "SERVER-8297 Remove 3-argument BinData constructor"

This reverts commit 39aad53ef21e4b44c82b9a81c5d50b8dde47ce1b.
Branch: master
https://github.com/mongodb/mongo/commit/e4230c5af776c7094c8a1b697b275da84fe00010

Comment by auto [ 01/Feb/13 ]

Author:

{u'date': u'2013-02-01T19:27:53Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-8297 Remove 3-argument BinData constructor

Remove undocumented and obsolete overload of the BinData constructor.
Branch: master
https://github.com/mongodb/mongo/commit/39aad53ef21e4b44c82b9a81c5d50b8dde47ce1b

Generated at Thu Feb 08 03:17:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.