Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vinyl: fix deferred DELETE statement lost on commit
Even if a statement isn't marked as VY_STMT_DEFERRED_DELETE, e.g. it's a REPLACE produced by an UPDATE request, it may overwrite a statement in the transaction write set that is marked so, for instance: s = box.schema.space.create('test', {engine = 'vinyl'}) pk = s:create_index('pk') sk = s:create_index('sk', {parts = {2, 'unsigned'}}) s:insert{1, 1} box.begin() s:replace{1, 2} s:update(1, {{'=', 2, 3}}) box.commit() If we don't mark REPLACE{3,1} produced by the update operatoin with VY_STMT_DEFERRED_DELETE flag, we will never generate a DELETE statement for INSERT{1,1}. That is, we must inherit the flag from the overwritten statement when we insert a new one into a write set. Closes #4248
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters