mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-33836 Compute modulus correctly in sequence
When the sequence is unsigned bigint, it needs to be cast to unsigned for correct computation of the modulus.
This commit is contained in:
@@ -253,4 +253,15 @@ select nextval(s);
|
||||
drop sequence s;
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33836 Assertion `(ulonglong) next_free_value % real_increment == (ulonglong) offset' failed in void sequence_definition::adjust_values(longlong)
|
||||
--echo #
|
||||
|
||||
CREATE SEQUENCE s AS BIGINT UNSIGNED START WITH 9223372036854775800 INCREMENT 0;
|
||||
set @old_AUTO_INCREMENT_INCREMENT=@@global.AUTO_INCREMENT_INCREMENT;
|
||||
set global AUTO_INCREMENT_INCREMENT=100;
|
||||
SELECT SETVAL (s,12345678901234567890);
|
||||
drop sequence s;
|
||||
set global AUTO_INCREMENT_INCREMENT=@old_AUTO_INCREMENT_INCREMENT;
|
||||
|
||||
--echo # End of 11.5 tests
|
||||
|
Reference in New Issue
Block a user