diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 09:01:01 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-04-21 09:01:01 +0300 |
commit | 80ed136e6dd4a021b1fc9b7bd7077bf989c3d247 (patch) | |
tree | cc24f0e4e9241920329865a1b66c1d086aaeaa9a /sql/sql_sequence.cc | |
parent | 675c22c065110be03a5fab82442d2c3dc32aefff (diff) | |
parent | a0588d54a20488b17a178244989e1abc5151a88a (diff) | |
download | mariadb-git-80ed136e6dd4a021b1fc9b7bd7077bf989c3d247.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r-- | sql/sql_sequence.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index f881f6a8cc6..307a0b29c57 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -727,8 +727,8 @@ longlong SEQUENCE::next_value(TABLE *table, bool second_round, int *error) if (real_increment > 0) { - if (reserved_until + add_to > max_value || - reserved_until > max_value - add_to) + if (reserved_until > max_value - add_to || + reserved_until + add_to > max_value) { reserved_until= max_value + 1; out_of_values= res_value >= reserved_until; |