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

Delimiter changed inside statement #2737

Closed
SamuraiPrinciple opened this issue Mar 24, 2020 · 1 comment
Closed

Delimiter changed inside statement #2737

SamuraiPrinciple opened this issue Mar 24, 2020 · 1 comment
Assignees
Milestone

Comments

@SamuraiPrinciple
Copy link

SamuraiPrinciple commented Mar 24, 2020

Which version and edition of Flyway are you using?

6.3.2

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)

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

Command-line

Which database are you using (type & version)?

MySQL 8.0.19

Which operating system are you using?

macOS, Centos 7

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

Tried running this migration:

drop procedure if exists p1;

delimiter $$
create procedure p1(p_a int)
begin
if p_a = 1 then
set p_a = 0;
elseif p_a = 2 then
set p_a = 3;
end if;
end$$
delimiter ;

What did you expect to see?

A procedure being created

What did you see instead?

ERROR: Unable to parse statement in sql/egames/R__0006_auto_settlement.sql at line 4 col 1: Delimiter changed inside statement at line 4 col 1: create procedure p1(p_a int)
begin
declare l_a int;
if p_a = 1 then
set p_a = 0;
elseif p_a = 2 then
set p_a = 3;
end if;
end$$

@SamuraiPrinciple
Copy link
Author

SamuraiPrinciple commented Mar 24, 2020

Also, case doesn't seem to be working either (same "Delimiter changed inside statement" error):

drop procedure if exists p1;

delimiter $$
create procedure p1(p_a int)
begin
case p_a
when 1 then set p_a = 0;
when 2 then set p_a = 3;
end case;
end$$
delimiter ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants