Skip to content

Commit 87b2bff

Browse files
committed
rm err in overflow logic
1 parent 7237ec9 commit 87b2bff

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

memory/table.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,6 @@ func (t *Table) PeekNextAutoIncrementValue(ctx *sql.Context) (uint64, error) {
11541154
// If the current auto increment value is out of range for the column type,
11551155
// return the maximum valid value instead
11561156
if _, inRange, err := autoCol.Type.Convert(ctx, data.autoIncVal); err == nil && inRange == sql.OutOfRange {
1157-
// When auto increment overflowed to 0, show the previous valid value
1158-
if data.autoIncVal == 0 {
1159-
return math.MaxUint64, nil
1160-
}
11611157
return data.autoIncVal - 1, nil
11621158
}
11631159

0 commit comments

Comments
 (0)