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 15.7: Incorrect syntax near 'GO'. #2041

Closed
seneiran opened this issue Jun 13, 2018 · 5 comments
Closed

Sybase 15.7: Incorrect syntax near 'GO'. #2041

seneiran opened this issue Jun 13, 2018 · 5 comments

Comments

@seneiran
Copy link

@seneiran seneiran commented Jun 13, 2018

Which version and edition of Flyway are you using?

5.1.0

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)

Yes

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

Maven Plugin

Which database are you using (type & version)?

Sybase 15.7

Which operating system are you using?

Jenkins Server : Linux 2.6.32-642.el6.x86_64 x86_64

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.)

Running a SQL script validated previously with DBeaver 5.06, we are getting :

[ERROR] Migration R__sp_tef.sql failed
[ERROR] ----------------------------------------------
[ERROR] SQL State : 37000
[ERROR] Error Code : 102
[ERROR] Message : Incorrect syntax near 'GO'.

What did you expect to see?

success SQL script execution

What did you see instead?

Error message previously described

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jun 13, 2018

Please share the contents of the file, so we can check why it fails to parse correctly.

@seneiran
Copy link
Author

@seneiran seneiran commented Jun 13, 2018

@Hey, sorry for the delayed response, i was cleaning the script.

i have attached the conflictive SP.

Running the script with DBeaver is sucessful, but using flyway generates the described error:

[ERROR] SQL State : 37000
[ERROR] Error Code : 102
[ERROR] Message : Incorrect syntax near 'GO'.
[ERROR] Line : 14
[ERROR] Statement : CREATE PROCEDURE store_procedure_1( @emp_num_rut char(12),

Thanks in advance!

sp_error.txt

@axelfontaine axelfontaine added this to the Flyway 5.2.0 milestone Jun 14, 2018
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Jun 14, 2018
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jun 14, 2018

Thanks for the file. That was very helpful. Flyway's parser was being tripped up by ELSE'somestring' constructs with no space in between. This has now been fixed.

@seneiran
Copy link
Author

@seneiran seneiran commented Jun 14, 2018

Thanks for the quick fix!

@axelfontaine , do you have an estimated to release this to be used with maven plugin ?

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Jun 14, 2018

@seneiran This is currently scheduled for 5.2 which is due out by the end of August/early September. Until then you can easily work around this by adding a space between ELSE and the string literal immediately following it.

dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.