New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DAT-16006] Fixing v8 Checksum calculation issue when using sql dbms attribute #4995
Conversation
…es to changesets) - but as we were calculating checksum v9 without them, keep on ignoring them otherwise we will break v9 checksum.
…es to changesets) - but as we were calculating checksum v9 without them, keep on ignoring them otherwise we will break v9 checksum.
…that are not expected to run.
…cksum but not v9; Change from Mysql to H2 improving performance.
if (change.generateStatementsVolatile(database)) { | ||
executor.comment("WARNING The following SQL may change each run and therefore is possibly incorrect and/or invalid:"); | ||
} | ||
if ((!(change instanceof DbmsTargetedChange)) || DatabaseList.definitionMatches(((DbmsTargetedChange) change).getDbms(), database, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this check back here (before 4.22.0 it was here and not at DbmsChangeSetFilter)
for (SqlVisitor visitor : changeSet.getSqlVisitors()) { | ||
if (!DatabaseList.definitionMatches(visitor.getApplicableDbms(), database, true)) { | ||
visitorsToRemove.add(visitor); | ||
} | ||
} | ||
for(Change change : changeSet.getChanges()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This filtering was moved back to Changeset class
...on-tests/src/test/groovy/liquibase/command/core/UpgradeChecksumVersionIntegrationTest.groovy
Show resolved
Hide resolved
As noted in #4665 (comment) tested that the artifacts here seem to resolve the issue in #4665 🙏 |
...on-tests/src/test/groovy/liquibase/command/core/UpgradeChecksumVersionIntegrationTest.groovy
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Impact
Description
Checksums (v8) are calculated differently for XML changesets with the dbms attribute on the change itself (instead of the changeset) after 4.22.0 .
Fixes #4665
Fixes #4457