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
Unable to decrease block depth below 0 error in version 6.1.1 #2597
Comments
@SDepn Thanks for reporting this. Flyway 6.1.1 introduces some changes to the parser which allow us to calculate the block depth, so it seems like your script contains a structure we didn't anticipate. I'm going to attempt to reproduce the issue with the information you've provided, but it might be that will need a bit more details to get to the bottom of it. |
@alextercete I'll try to help out as good as i can. |
Is there any chance you can share a bit more context on the tokens that come immediately before Also, are there any other |
declare
var1 number;
var2 number;
begin
var1 := -1;
var2 := -1;
for r in (
select * from (
select t.*,
count(*) over (partition by [...]) ct
from [...] t
)
where ct > 1
order by
[...]
case when [...] then 0 else
case when [...] then 1 else 2 end end,
case when [...] then [...]-sys_extract_utc(current_timestamp) else
sys_extract_utc(current_timestamp)-[...] end
)
loop
if (var2 <> r.[...] or var1 <> r.[...]) then
var2 := r.[...];
var1 := r.[...];
else
delete from [...]
where [...] = r.[...];
end if;
end loop;
end;
/
alter table [...] add (
constraint [...]
unique ([...])
); This is the whole script without variable names, table names, etc. Hope this helps. |
@SDepn Thanks for taking the time to put that script together, that's really helpful |
@SDepn We've been able to reproduce the issue and we're working on a fix which should be available in the next release. Thanks again for your help! |
Thank you for the quick replies. I am looking forward to it. |
Merged, just confirming it will be in v6.1.2 |
…pretation of LOOP
Which version and edition of Flyway are you using?
6.1.1
Which client are you using?
Command-line
Which database are you using (type & version)?
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Which operating system are you using?
Windows / CentOS
What did you do?
Hi,
this morning i found that our automated migration testing crashed, which didn't happen yesterday. It crashed with the following error:
I can't provide the whole migration file which crashed, but this is the general idea:
This file has not been changed since yesterday and as I found out, our docker image updated since yesterday from version 6.1.0 to 6.1.1. So it seems like something in 6.1.1 changed, which caused this error.
Hope this helps tracking down this issue.
Edit:
This is the debug output for that command:
The text was updated successfully, but these errors were encountered: