Skip to content

Commit

Permalink
Merge pull request #3227 from realm/tg/null-int-pk
Browse files Browse the repository at this point in the history
Emit the correct instruction for add_row_with_key(none)
  • Loading branch information
James Stone authored Jan 25, 2019
2 parents 908dc55 + d6b9a7a commit 4c33fa0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
* Compacting a realm into an encrypted file could take a really long time. The process is now optimized by adjusting the write
buffer size relative to the used space in the realm.
([#2754](https://github.com/realm/realm-sync/issues/2754))

* Creating an object after creating an object with the int primary key of "null" would hit an assertion failure.
([#3227](https://github.com/realm/realm-core/pull/3227)).

### Breaking changes
* None.

Expand Down
2 changes: 1 addition & 1 deletion src/external/pegtl
Submodule pegtl updated 316 files
2 changes: 1 addition & 1 deletion src/realm/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@ size_t Table::add_row_with_key(size_t key_col_ndx, util::Optional<int64_t> key)
repl->add_row_with_key(this, row_ndx, prior_num_rows, key_col_ndx, *key); // Throws
else {
repl->insert_empty_rows(this, row_ndx, 1, prior_num_rows); // Throws
repl->set_null(this, key_col_ndx, row_ndx);
repl->set_null(this, key_col_ndx, row_ndx, _impl::instr_SetUnique);
}
}

Expand Down

0 comments on commit 4c33fa0

Please sign in to comment.