-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
SQL Anywhere: Recompile all views after last change of update #4577
Conversation
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.
Approved.
Code changes looks good to me. Change made on update logic does not have any impact as this is only doing something for SybaseASADatabase
.
Thank you @mkarg!
liquibase-standard/src/main/java/liquibase/command/core/AbstractUpdateCommandStep.java
Show resolved
Hide resolved
# Conflicts: # liquibase-standard/src/main/java/liquibase/database/Database.java
Signed-off-by: filipe <flautert@liquibase.org>
Kudos, SonarCloud Quality Gate passed! |
@mkarg I did a small refactoring to use the already existing sql executor method instead of creating a new one - could you confirm if it's fine for you? Then I'll get it merged for next release. |
LGTM. :-) |
Impact
Fixes #4575
Description
The solution for #4575 simply is to execute the command
sa_recompile_views(1)
(see SAP SQL Anywhere Manual) once after the very last change was executed byupdate
, which is exactly the same command that the original native tools from SAP execute to resolve this situation. This command never induces any risk, so unconditional execution is no problem in any case (which is why SAP's native tools do execute it unconditionaly).Things to be aware of
To make the code a little cleaner I extended the
Database
interface by a newdefault
method, i. e. it implies no harm to existing code, but it opens the possibility for all RDBMS to execute some useful code in similar situations.Things to worry about
Despite the causeless warning in the SAP manual, as this is exactly the original solution applied by the original native SAP tools, there is absolutely nothing to worry about.
Additional Context
N/A