diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-04-25 21:32:47 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-04-25 21:32:47 +0200 |
commit | ddb1e1d009aaf0272a46ffdd9977bcde32c89305 (patch) | |
tree | d51f6477b8e1d58737e3b6a7d18d6afd19ea3d4e /sql/sql_sequence.cc | |
parent | b4ee699a89ccf4f3cf52a18236e821f0d8466e8d (diff) | |
download | mariadb-git-bb-10.3-MDEV-15732.tar.gz |
MDEV-15732: Assertion `next_free_value % real_increment == offset && next_free_value >= reserved_until' failed in sequence_definition::adjust_values upon SETVAL for sequence with INCREMENT 0bb-10.3-MDEV-15732
there was 2 problems with "next_free_value >= reserved_until" condition:
1) it should be <=
2) SEQUENCE::set_value handle next_free_value & reserved_until after adjust_values() call, so it is incorect to put assert on it in adjust_values()
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r-- | sql/sql_sequence.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index 18f0028908f..4d0f15386e7 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -560,8 +560,7 @@ void sequence_definition::adjust_values(longlong next_value) else { next_free_value+= to_add; - DBUG_ASSERT(next_free_value % real_increment == offset && - next_free_value >= reserved_until); + DBUG_ASSERT(next_free_value % real_increment == offset); } } } |