Commit 473ee856 authored by Sergei Golubchik's avatar Sergei Golubchik

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 374783c3
parent 2be3b8e8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment