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 DOES support CREATE OR REPLACE VIEW, despite what the source code says! #4620

Closed
2 tasks done
mkarg opened this issue Aug 8, 2023 · 0 comments · Fixed by #4621
Closed
2 tasks done

SQL Anywhere DOES support CREATE OR REPLACE VIEW, despite what the source code says! #4620

mkarg opened this issue Aug 8, 2023 · 0 comments · Fixed by #4621

Comments

@mkarg
Copy link
Contributor

mkarg commented Aug 8, 2023

Search first

  • I searched and no similar issues were found

Description

The source code says that SQL Anywhere does not support CREATE OR REPLACE VIEW, and "thinks" it must skip handling the "OR REPLACE" case. In fact, simply removing this code proofs that SQL Anywhere works pretty well still (I tested it with SQL Anywhere 17.0.11, hence latest. I correctly handles CREATE VIEW just as CREATE OR REPLACE VIEW, and it works correctly with replaceIfExists when true, when false and when omitted. The manual proofs that this is officially supported: https://help.sap.com/docs/SAP_SQL_Anywhere/93079d4ba8e44920ae63ffb4def91f5b/816d37a36ce21014bf6cacd0588a42f3.html. Hence the is no need for any special treatment; we can simply remove the special cases here.

NB: It is true that OR REPLACE was not existing in very, very, very old releases of SQL Anywhere, but for at least ten years it is officially supported now. We do not have to take care for such old versions.

Steps To Reproduce

<createView fullDefinition="false" viewName="MyView" replaceIfExists="true">SELECT 1</createView>
liquibase update-sql

Expected/Desired Behavior

CREATE OR REPLACE VIEW MyView AS SELECT 1

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!)
mkarg added a commit to mkarg/liquibase that referenced this issue Aug 8, 2023
mkarg added a commit to mkarg/liquibase that referenced this issue Aug 8, 2023
mkarg added a commit to mkarg/liquibase that referenced this issue Aug 10, 2023
mkarg added a commit to mkarg/liquibase that referenced this issue Aug 10, 2023
rberezen pushed a commit that referenced this issue Sep 1, 2023
filipelautert pushed a commit that referenced this issue Sep 19, 2023
…W, despite what the source code says!" (#4621)

* Fixed #4620: SQL Anywhere DOES support CREATE OR REPLACE VIEW, despite what the source code says!

* replaceIfExists test assertion updated.

---------

Co-authored-by: Daniel Mallorga <dmallorga@liquibase.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants