Skip to content

Commit

Permalink
Merge pull request cockroachdb#20973 from vilterp/seq-bounds-no-cycle
Browse files Browse the repository at this point in the history
sql: sequences: respect MINVALUE and MAXVALUE options
  • Loading branch information
vilterp authored Jan 9, 2018
2 parents 0a9a556 + 3b744de commit d41624a
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 226 deletions.
1 change: 1 addition & 0 deletions pkg/roachpb/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/roachpb/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,13 @@ func (*TxnPrevAttemptError) message(_ *Error) string {
}

var _ ErrorDetailInterface = &TxnPrevAttemptError{}

func (e *IntegerOverflowError) Error() string {
return e.message(nil)
}

func (e *IntegerOverflowError) message(_ *Error) string {
return fmt.Sprintf(
"key %s with value %d incremented by %d results in overflow",
e.Key, e.CurrentValue, e.IncrementValue)
}
Loading

0 comments on commit d41624a

Please sign in to comment.