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

Sybase ASE: parsing error with double-quoted string literals #2281

Closed
smrutikanta-cog opened this Issue Jan 27, 2019 · 10 comments

Comments

Projects
None yet
2 participants
@smrutikanta-cog
Copy link

smrutikanta-cog commented Jan 27, 2019

Which version and edition of Flyway are you using?

Flyway Community Edition 5.1.4

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Have not tried with the latest version

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

command-line

Which database are you using (type & version)?

sybase-ase

Which operating system are you using?

Linux

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

Flyway gives a syntax error for the sql where as the same sql works just fine in rabbit sql or any other tool which executes sql.

error msg:
ERROR:
Migration V2.1__sp_sqlname.sql failed

SQL State : 42S22
Error Code : 207
Message : Invalid column
name'************************************************************************************'.

What did you expect to see?

Execute the sql without error

What did you see instead?

syntax error

Tried to change the encoding also. But that also does not seem to resolve the issue

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Jan 30, 2019

Please try again with the latest version. If that doesn't help please share the smallest possible SQL file that triggers this.

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Jan 31, 2019

Thanks for getting back to me! sure I will try and let you know soon

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Feb 1, 2019

Ran with the latest available version flyway-5.2.4
Still getting the same error
error msg:
ERROR:
Migration V2.1__sp_sqlname.sql failed
SQL State : 42S22
Error Code : 207
Message : Invalid column name ' '.
I commented out the earlier code block to see if the error goes away but it still errors out on another code block
So please help

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 1, 2019

As I said: please share the smallest possible SQL file that triggers this.

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Feb 4, 2019

Please find the SQL below

/* Begin Removal of XXXXXXXXXX changes */
select "**" + char(10) + "**       Pre-change 'FROM' MXXXX XXXXX PLAN (" + convert(varchar(20),@FromXXXXXX) + ") XXXXX XXXX:"
select "              " + s.SubjectXXX as ' '
    from Subject s, SubjectXXXXXXXRel sr
    where s.SubjectXXX = @XXXXXXXXX
    and s.SubXXXXXXXXX = sr.XXXXXXXXXXX
    and sr.SubjXXXXXXXXXXXX = 1
    order by SubjectXXX
/* End XXXXXXX of XXXXXXXXXXXX changes */

@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Feb 4, 2019

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Feb 4, 2019

thanks Alex for taking this one!
When will this version be released?
In the mean time do you have a work around for me?

@axelfontaine axelfontaine changed the title flyway throws syntax error for perfectly working SQL Sybase ASE: parsing error with double-quoted string literals Feb 7, 2019

axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Feb 7, 2019

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 7, 2019

This has been automatically fixed as part of the big parser rewrite for Flyway 6.0.

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Feb 7, 2019

Thanks for fixing this so quick
When will the image be available on dockerhub to pull?

@axelfontaine

This comment has been minimized.

Copy link
Contributor

axelfontaine commented Feb 14, 2019

@smrutikanta-cog It's available now as 6.0.0-beta

@smrutikanta-cog

This comment has been minimized.

Copy link
Author

smrutikanta-cog commented Feb 14, 2019

@axelfontaine my shop uses 15.7 version of Sybase which is no longer supported by the community version of Flyway and at this time they wont go for the enterprise version. Had they used the community version for sometime then they could have been inclined to use the enterprise version but now that is not an option

Thanks anyways for your response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.