Skip to content
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 fails to create view-on-a-view if changes are performed in wrong order #4536

Closed
2 tasks done
mkarg opened this issue Jul 25, 2023 · 0 comments · Fixed by #4537
Closed
2 tasks done

SQL Anywhere fails to create view-on-a-view if changes are performed in wrong order #4536

mkarg opened this issue Jul 25, 2023 · 0 comments · Fixed by #4537

Comments

@mkarg
Copy link
Contributor

mkarg commented Jul 25, 2023

Search first

  • I searched and no similar issues were found

Description

SQL Anywhere can define views on tables, but also views on views. At creation of the view it checks if the source table or source view does really exists. Whether this check succeeds is a race condition among the view creations: If V1 is a SELECT on V2, and V2 is created after V1, then update fails to create V1. Unfortunately, generateChangelog does not specify any particular order of the changes when reading them from a SQL Anywhere database, so V1 is tried to get created before V2 - hence update fails.

Steps To Reproduce

CREATE TABLE T (C INT);
CREATE VIEW V2 AS SELECT * FROM T;
CREATE VIEW V1 AS SELECT * FROM V2;
liquibase generateChangelog
liquibase update

Expected/Desired Behavior

Either generateChangelog produces a changelog specifying the needed sequence (V2 before V1), or update finds a way to silently resolve this situation.

Liquibase Version

master

Database Vendor & Version

SAP SQL Anywhere 17.0.11

Liquibase Integration

N/A

Liquibase Extensions

N/A

OS and/or Infrastructure Type/Provider

Windows 10 Pro (German)

Additional Context

N/A

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants