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: Wrong DDL syntax CREATE SEQUENCE ... AS ... #4415

Closed
2 tasks done
mkarg opened this issue Jun 21, 2023 · 0 comments · Fixed by #4417
Closed
2 tasks done

SQL Anywhere: Wrong DDL syntax CREATE SEQUENCE ... AS ... #4415

mkarg opened this issue Jun 21, 2023 · 0 comments · Fixed by #4417

Comments

@mkarg
Copy link
Contributor

mkarg commented Jun 21, 2023

Search first

  • I searched and no similar issues were found

Description

Using latest SQL Anywhere 17.0.11-7254 as a standalone engine (without using testcontainers) I am trying to execute integration tests, and this is the result:

[ERROR] liquibase.dbtest.asany.SybaseASAIntegrationTest.testRerunDiffChangeLog  Time elapsed: 24.851 s  <<< ERROR!
liquibase.exception.CommandExecutionException:
liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for changeset changelogs/common/common.tests.changelog.xml::seq-test-datatype::flautert:
     Reason: liquibase.exception.DatabaseException: [SAP][JDBC Driver][SQL Anywhere]Syntaxfehler bei 'AS' in Zeile 1  [Failed SQL: (-131) CREATE SEQUENCE lbuser.seqtestdatatypeonall AS int]

Apparently Liquibase expects that SQL Anywhere supports the syntax CREATE SEQUENCE ... AS ..., but according to the latest product manual SQL Anywhere is (and I assume, it ever was) unable to deal with the AS ... clause:

CREATE [ OR REPLACE ] SEQUENCE [ owner .] sequence-name
[ INCREMENT BY signed-integer ]
[ START WITH signed-integer ]
[ MINVALUE signed-integer | NO MINVALUE ]
[ MAXVALUE signed-integer | NO MAXVALUE ]
[ CACHE integer | NO CACHE ]
[ CYCLE | NO CYCLE ]

Steps To Reproduce

dbinit -dba lbuser,LiquibasePass1 liquibase
liquibase:
  sdk:
    testSystem:
      test: asany

      asany:
        url: jdbc:sqlanywhere:DBF=liquibase.db
mvn verify -Dtest=SybaseASAIntegrationTest -Dsurefire.failIfNoSpecifiedTests=false

Expected/Desired Behavior

The IT passes successfully.

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

Standalone engine / Without Testcontainers

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 Jun 21, 2023
…..."

In addition to the original issue description, not only the reported bug
is fixed, but also the support for CREATE SEQUENCE was extended in
alignment with the latest product manual.
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 22, 2023
…..."

In addition to the original issue description, not only the reported bug
is fixed, but also the support for CREATE SEQUENCE was extended in
alignment with the latest product manual.
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 22, 2023
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…... AS ..."

Corrects SQL Anywhere syntax: NO CACHE instead of NOCACHE
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…... AS ..."

Unit test for SQL Anywhere NO CACHE clause
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…... AS ..."

Unit test for SQL Anywhere NO CACHE clause
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…..."

In addition to the original issue description, not only the reported bug
is fixed, but also the support for CREATE SEQUENCE was extended in
alignment with the latest product manual.
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…... AS ..."

Corrects SQL Anywhere syntax: NO CACHE instead of NOCACHE
mkarg added a commit to mkarg/liquibase that referenced this issue Jun 26, 2023
…... AS ..."

Unit test for SQL Anywhere NO CACHE clause
filipelautert pushed a commit that referenced this issue Jun 29, 2023
* Fixes issue #4415: "Wrong DDL syntax CREATE SEQUENCE ... AS ..."

In addition to the original issue description, not only the reported bug
is fixed, but also the support for CREATE SEQUENCE was extended in
alignment with the latest product manual.


Unit test for SQL Anywhere NO CACHE clause
@filipelautert filipelautert added this to the 1NEXT milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants