-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
The fuzzer captured this failure. I reproduced it to this minimal test case.
Apply these instructions:
AddTable { table: gr, tableType: Top-Level, pkName: _id, pkType: String, pkNullable: false } AddColumn { table: gr, field: vg, type: Mixed, collection: List, isNullable: true, targetTable: } CreateObject { table: "gr", id: "{String: "cavhdqmgvna"}" } ArrayInsert { (table="gr", ID="{String: "cavhdqmgvna"}", fullPath="vg.0"), payload: {Binary: Binary(string: , raw: [])}, priorSize: 0 } Update { (table="gr", ID="{String: "cavhdqmgvna"}", fullPath="vg.0"), payload: {String: ""}, isDefault: false, priorSize: 1 }
And the result of the object will be:
{ "class_gr":[{"_id":"cavhdqmgvna","vg":[{"$binary": {"base64": "", "subType": "00"}}]}] }
As you can see, setting a mixed list to just be a single element with an empty binary payload and then updating it to be an empty string winds up resulting in the list still just being an empty binary.
I updated the binaries we are using to the most recent master release for realm-core.
This reminds me of this ticket and I would bet its related in some way: https://jira.mongodb.org/browse/RCORE-802
- related to
-
RCORE-802 Set<Mixed> should not consider string and binary data equivilent
- Closed