Correctly handle cacheSize in mariadb #2270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds support for createSequence and alterSequence cacheSize in mariadb
Fixes #2147
Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Ran createSequence and alterSequence tags against mariadb to ensure they set cacheSize.
Used these changesets:
Test Requirements (Liquibase Internal QA)
Manual Tests
Verify that update-sql generates sql code for cache argument with createSequence tag.
liquibase update-sql --changelog-file lb2191-changelog.xml --labels create
CREATE SEQUENCE SEQ_SET INCREMENT BY 1 START WITH 10000000 CACHE 5;
Verify that update is successful with cache argument for createSequence tag.
liquibase update --changelog-file lb2191-changelog.xml --labels create
Verify that update-sql generates sql code for cache argument with alterSequence tag.
liquibase update-sql --changelog-file lb2191-changelog.xml --labels alter
ALTER SEQUENCE SEQ_SET CACHE 10;
Verify that update is successful with cache argument for alterSequence tag.
liquibase update --changelog-file lb2191-changelog.xml --labels alter
Verify that update-sql generates correct sql code for cacheSize=0 argument with createSequence tag.
liquibase update-sql --changelog-file lb2191-changelog.xml --labels create-nocache
CREATE SEQUENCE SEQ_NO INCREMENT BY 1 START WITH 10000000 CACHE 0;
Verify that update is successful with cacheSize=0 argument for createSequence tag.
liquibase update --changelog-file lb2191-changelog.xml --labels create-nocache
Verify that update-sql generates correct sql code for cacheSize=0 argument with alterSequence tag.
liquibase update-sql --changelog-file lb2191-changelog.xml --labels alter-nocache
ALTER SEQUENCE SEQ_SET NOCACHE;
Verify that update is successful with cacheSize=0 argument for alterSequence tag.
liquibase update --changelog-file lb2191-changelog.xml --labels alter-nocache
Verify that update-sql generates correct sql code without cache argument for createSequence tag.
liquibase update-sql --changelog-file lb2191-changelog.xml --labels create
CREATE SEQUENCE SEQ_DEF INCREMENT BY 1 START WITH 10000000;
Verify that update is successful without cache argument for createSequence tag.
liquibase update --changelog-file lb2191-changelog.xml --labels create
Automated Tests
No new functional tests required for this fix.
┆Issue is synchronized with this Jira Bug by Unito