forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql : alter sequence's increment and the results of 'select nextval()…
…' were not as expected If the sequenceVal exceeded the old MinValue or MaxValue, we must set sequenceVal to the last valid one. 1. Values is just init, when the sequence is altered before it has ever been used. In this case, last valid sequenceVal is oldStart. Set the initial value to the oldStartValue(just like pg), when last valid sequenceVal in [newMinValue, newMaxValue]. 2. When the sequenceVal out of range result from increment, report an error. Fixed cockroachdb#52552 cockroachdb#74127 Release note (bug fix): A bug with ALTER SEQUENCE that allowed a sequence to return values that are out-of-range has been fixed.
- Loading branch information
1 parent
a4d141a
commit a356116
Showing
4 changed files
with
323 additions
and
28 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
Oops, something went wrong.