Comments - CREATE SEQUENCE
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
Is it possible to exclude a range from a sequence? Eg: Minvalue = 1, Maxvalue = 100 Exclude range = [80..90]
I don't understand when and how, but sometime the sequence pass from one value to value plus 1000. that is, if last value was 5, the next value'll be 1005. I didn't do restart mariadb or other reboot... Exist a bug? Can you help me? Now in order to resolve I recreate the sequence with cache to 0. it could be a solution?
You need to provide more details, or report as a bug with full details on how to recreate, and what your settings and structure are.
I don't know how replicate the bug, it seems random, I'm Mariadb 10.4 and I create a sequence like CREATE SEQUENCE $nameSequence START WITH 2 INCREMENT BY 1;
the setting is default Mariadb 10.4, I don't know what other give you... So have you never had this problem?
If there was a server restart or a `flush tables {sequencename}` is performed on the sequence then the range of values (the CACHE) is lost.
Also implicit closing by running out of table cache will result in the cached values being lost and the sequence restarting at the next non-cached value:
e.g:
If you'd like a different functionality please request it on JIRA (same as bug reporting link above).
I may be related to https://jira.mariadb.org/browse/MDEV-23831
Does this functionality work in a Galera cluster? That would be great!