[CXX-1476] Element search stops prematurely due to missing string length check Created: 24/Nov/17 Updated: 28/Oct/23 Resolved: 06/Dec/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.2.0-rc0 |
| Fix Version/s: | 3.2.0-rc1 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Denis Bip | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
debian 9 |
||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Description |
|
Hi! After upgrading driver I cant parse oplog documents which contains "$set". Example: }} |
| Comments |
| Comment by Githook User [ 06/Dec/17 ] |
|
Author: {'name': 'Andrew Morrow', 'username': 'acmorrow', 'email': 'acm@mongodb.com'}Message: Also, adds a regression test for |
| Comment by Githook User [ 06/Dec/17 ] |
|
Author: {'name': 'Andrew Morrow', 'username': 'acmorrow', 'email': 'acm@mongodb.com'}Message: Also, adds a regression test for |
| Comment by Githook User [ 06/Dec/17 ] |
|
Author: {'name': 'kevin1018', 'username': 'kevin1018', 'email': 'wangxk1028@gmail.com'}Message: If a document has a "de" key and a "desc" key, when searching for the "de" key, it may match the "desc" key. |
| Comment by Denis Bip [ 04/Dec/17 ] |
|
Hi! Thank's! https://github.com/mongodb/mongo-cxx-driver/pull/607 is not my issue |
| Comment by Andrew Morrow (Inactive) [ 02/Dec/17 ] |
|
denbip - I did a little digging - and I think this issue was introduced during the changes for |
| Comment by Andrew Morrow (Inactive) [ 02/Dec/17 ] |
|
Hi denbip - First, thank you for testing out the release candidate. We really appreciate it and also appreciate your taking the time to report issues you have encountered. I'm having a little trouble understanding exactly what problem you are encountering from the description in this ticket, but I think that what you are saying is that when you ask for the o element you are actually getting the op element, in which case, does this PR address your issue: https://github.com/mongodb/mongo-cxx-driver/pull/607? If so, are you the author? Is that what you mean by "return old code back?", or something else. |
| Comment by Denis Bip [ 24/Nov/17 ] |
|
So, I found issue. It is view::const_iterator view::find(stdx::string_view key) const, I've return old code back and now it works |
| Comment by Denis Bip [ 24/Nov/17 ] |
|
It seems something wrong with operator[] in bsoncxx::document::element |
| Comment by Denis Bip [ 24/Nov/17 ] |
|
Also it doesnt work with arrays. Example: , "id_client" : 24, "code_id" : { "$oid" : "58dcadd1c45a4e67e04a78df" }, "code" : [ { "_id" : { "$oid" : "58dcadd1c45a4e67e04a78df" }, "seria" : "EEE", "number" : "123" } ] } |