From 0bdc15d86ea94df6ed7ac07e69309d7b9b7281b2 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 25 Apr 2018 21:32:47 +0200 Subject: 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 0 there was a problem with "next_free_value >= reserved_until" condition: 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() --- sql/sql_sequence.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/sql_sequence.cc') 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); } } } -- cgit v1.2.1