@SequenceGenerator with mariadb considers increment parameter in DB should be same as allocationSize in annotation

Description

startup exception:

thrown for

sequence created with:

content of seq table in mariadb:

"next_not_cached_value","minimum_value","maximum_value","start_value","increment","cache_size","cycle_option","cycle_count"
2000,1000,9223372036854775806,1000,1,1000,0,0

Environment

linux, java, spring-boot

Activity

Show:
Nathan Xu
December 13, 2019, 7:34 PM
Edited

So I checked 5.4.10 and found the following command issued to create the sequence if not exists:

so it seems the command generated is correct.

Throwing exception when annotated increment size is different than the one in db is a feature (one of few options), so it seems there is no bug found in this ticket.

Nathan Xu
December 15, 2019, 10:59 PM

However, a new bug filed recently when sequence optimizer is HiLo:

Nathan Xu
December 19, 2019, 5:59 PM

This is not a bug but an expected feature. See https://vladmihalcea.com/migrate-hilo-hibernate-pooled/

Assignee

Unassigned

Reporter

Miroslav Zaťko

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure