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

Flyway doesn't remove trailing slash in PL/SQL block #692

Closed
Prismapanda opened this issue Feb 7, 2014 · 1 comment
Closed

Flyway doesn't remove trailing slash in PL/SQL block #692

Prismapanda opened this issue Feb 7, 2014 · 1 comment

Comments

@Prismapanda
Copy link

@Prismapanda Prismapanda commented Feb 7, 2014

Given the following script:

DECLARE 
    PROCEDURE ins (v_param varchar) is
    begin
        SELECT 1 FROM DUAL WHERE v_param = v_param;
    end;
BEGIN
    ins(' N');
COMMIT;
END;
/

When doing a migration Flyway throws the following error:

Failed to execute goal com.googlecode.flyway:flyway-maven-plugin:2.3:migrate (default-cli) on project flyway-project: com.googlecode.flyway.core.command.FlywaySqlScriptException: Error executing statement at line 1: 
DECLARE
PROCEDURE ins (v_param varchar) is
begin
SELECT 1 FROM DUAL WHERE v_param = v_param;
end;
BEGIN
ins(' N');
COMMIT;
END;
/: ORA-06550: Line 10, Column 1:
PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.

This is because it doesn't remove the trailing '/' when executing via jdbc. The magic line in this code is ins(' N');, any other string passes - it's just the sequence blank-upper_N-apostroph which provokes the wrong parsing.

Flyway 2.3
Oracle 11g (11.2.0)
ojdbc7-12.1.0.1

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Feb 11, 2014

Thanks for reporting and investigating this!

The N' clue really helped me in fixing this.

Cheers
Axel

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.