Skip to content

Commit

Permalink
MDEV-28152 fix UBSAN error
Browse files Browse the repository at this point in the history
sql_sequence.h:233:19: runtime error: signed integer overflow: -9223372036854775808 + -1 cannot be represented in type 'long long int'

followup for 374783c
  • Loading branch information
vuvova committed Mar 21, 2024
1 parent 2be3b8e commit 473ee85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/sql_sequence.h
Expand Up @@ -230,7 +230,7 @@ class SEQUENCE :public sequence_definition
}
else
{
if (value + increment < min_value || value < min_value - increment)
if (value <= min_value || value + increment < min_value)
value= min_value - 1;
else
value+= increment;
Expand Down

0 comments on commit 473ee85

Please sign in to comment.