Fix CORE-5174#10
Merged
dyemanov merged 1 commit intoFirebirdSQL:masterfrom Mar 28, 2016
Merged
Conversation
Member
|
How could savepoint 7 be started after savepoint 14? Does savepoint 7 re-appear after saving/restoring stack on suspend? |
Contributor
Author
|
Stack is shown from new savepoints to old one. Savepoint 1 is transaction savepoint, savepoint 7 is statement savepoint. |
| tra_save_point->sav_next->sav_number >= number) | ||
| while(tra_save_point && tra_save_point->sav_number > number && | ||
| tra_save_point->sav_next && tra_save_point->sav_next->sav_number >= number) | ||
| { |
Member
There was a problem hiding this comment.
- AFAIU, you assume here that only one savepoint in the stack may have its number out of order, supposedly this is the looper-generated one. Couldn't there be more? E.g. started by BlockNode or SavePointNode?
- Shouldn't the same check be applied to other places like BlockNode::execute()? I see there the kissing cousin of the loop you've fixed in tra.cpp.
Contributor
Author
There was a problem hiding this comment.
- I assume that there cannot be savepoints with smaller number before the given one in stack. BlockNode and SavePointNode AFAIU cannot swap execution order of nested PSQL calls and WHEN handlers are allowed in PSQL only.
- Agree. I'll commit the change into CORE-5173 branch a little later.
Merged
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Take into account possible reverse of savepoint number sequence in short chains.
Example:
For savepoints sequence "12 -> 14 -> 7 -> 1" request to rollback savepoints up to 12, must result in "14 -> 7 -> 1", not "7 -> 1" as it might happen before this fix.