Skip to content

Commit 473ee85

Browse files
committed
MDEV-28152 fix UBSAN error
sql_sequence.h:233:19: runtime error: signed integer overflow: -9223372036854775808 + -1 cannot be represented in type 'long long int' followup for 374783c
1 parent 2be3b8e commit 473ee85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/sql_sequence.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class SEQUENCE :public sequence_definition
230230
}
231231
else
232232
{
233-
if (value + increment < min_value || value < min_value - increment)
233+
if (value <= min_value || value + increment < min_value)
234234
value= min_value - 1;
235235
else
236236
value+= increment;

0 commit comments

Comments
 (0)