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 6.0.1 parser bug #2522

Closed
sladis opened this issue Oct 2, 2019 · 8 comments
Closed

Flyway 6.0.1 parser bug #2522

sladis opened this issue Oct 2, 2019 · 8 comments

Comments

@sladis
Copy link

@sladis sladis commented Oct 2, 2019

Which version and edition of Flyway are you using?

6.0.1. Enterprise

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)

Cmd

Which database are you using (type & version)?

Oracle12

Which operating system are you using?

Unix

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.)
First 3 lines of sql script is multiline comment containing characters č,í,ú
Like:

/*********/
/*dopíči */
/********/
What did you expect to see?

Run sql script without errors

What did you see instead?

ERROR: Unable to parse statement in V1_script.sql at line 1 col 1: flyway parser bug: token text is null (COMMENT -> 2:1)

@alextercete

This comment has been minimized.

Copy link
Member

@alextercete alextercete commented Oct 2, 2019

@sladis Thanks for reporting this. Any chance you can share the entire migration script (with any sensitive bits redacted) so that we can attempt a reproduction?

@sladis

This comment has been minimized.

Copy link
Author

@sladis sladis commented Oct 3, 2019

/*******************************************************/
/*         Založení eíselníku a jejich úprava          */
/*******************************************************/
--Eíselníky
SET DEFINE OFF
begin
aps.apslist.newList(null,'SMS zprávy','LST169');
aps.apslist.newList(null,'Manuální verifikace - Extended','LST053');
aps.apslist.newList(null,'Manuální verifikace','LST059');
end;
/
begin
aps.apslist.newListItem('LST169','SMS_1','LST169_0001','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_2','LST169_0002','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_3','LST169_0003','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_4','LST169_0004','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_5','LST169_0005','','9-17','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_6','LST169_0006','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_7','LST169_0007','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_8','LST169_0008','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_9','LST169_0009','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_10','LST169_0010','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_11','LST169_0011','','0-23','text','0','1','','');
aps.apslist.newListItem('LST169','SMS_12','LST169_0012','','0-23','text','0','1','','');
end;
/
begin
aps.apslist.newListItem('LST053','MV BL','LST053_0001','1','BL','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0001','');
aps.apslist.newListItem('LST053','MV CE','LST053_0002','2','CE','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0002','');
aps.apslist.newListItem('LST053','MV EMP','LST053_0003','3','BW','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0003','');
aps.apslist.newListItem('LST053','MV CIF','LST053_0004','4','CIF','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0004','');
aps.apslist.newListItem('LST053','MV SAL','LST053_0005','5','SAL','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0005','');
aps.apslist.newListItem('LST053','MV ADR','LST053_0006','6','ADD','''LST053_0017'',''LST053_0007'',''LST053_0008''','0','1','LST059_0006','');
aps.apslist.newListItem('LST053','Data Set','LST053_0007','7','','''''','0','1','','');
aps.apslist.newListItem('LST053','Kontrola 4 oeí','LST053_0008','8','','''''','0','1','','');
aps.apslist.newListItem('LST053','MV CBL 1','LST053_0009','9','','''LST053_0017'',''LST053_0007'',''LST053_0008'',''LST053_0001'',''LST053_0002'',''LST053_0003'',''LST053_0004'',''LST053_0005'',''LST053_0006''','0','1','LST059_0007','');
aps.apslist.newListItem('LST053','MV CBL 2','LST053_0010','10','','''LST053_0017'',''LST053_0007'',''LST053_0008'',''LST053_0001'',''LST053_0002'',''LST053_0003'',''LST053_0004'',''LST053_0005'',''LST053_0006''','0','1','LST059_0008','');
aps.apslist.newListItem('LST053','MV CBL 3','LST053_0011','11','','''LST053_0017'',''LST053_0007'',''LST053_0008'',''LST053_0001'',''LST053_0002'',''LST053_0003'',''LST053_0004'',''LST053_0005'',''LST053_0006''','0','1','LST059_0009','');
aps.apslist.newListItem('LST053','MV CBL 4','LST053_0012','12','','''LST053_0017'',''LST053_0007'',''LST053_0008'',''LST053_0001'',''LST053_0002'',''LST053_0003'',''LST053_0004'',''LST053_0005'',''LST053_0006''','0','1','LST059_0010','');
aps.apslist.newListItem('LST053','AV CE','LST053_0013','13','','''''','0','1','','');
aps.apslist.newListItem('LST053','AV BW','LST053_0014','14','','''''','0','1','','');
aps.apslist.newListItem('LST053','AV CIF','LST053_0015','15','','''''','0','1','','');
aps.apslist.newListItem('LST053','AV CBL 1','LST053_0016','16','','''''','0','1','','');
aps.apslist.newListItem('LST053','DS1','LST053_0017','17','','''''','0','1','','');
aps.apslist.newListItem('LST053','Referral','LST053_0018','18','','''LST053_0017'',''LST053_0007'',''LST053_0008'',''LST053_0001'',''LST053_0002'',''LST053_0003'',''LST053_0004'',''LST053_0005'',''LST053_0006'',''LST053_0009'',''LST053_0010'',''LST053_0011'',''LST053_0012''','0','1','','');
aps.apslist.newListItem('LST053','Archiv  odchozí','LST053_0019','19','','""','0','1','','');
aps.apslist.newListItem('LST053','Archiv poíchozí','LST053_0020','20','','""','0','1','','');
aps.apslist.newListItem('LST053','Oznámení o zmini','LST053_0021','21','','""','0','1','','');
aps.apslist.newListItem('LST053','Kontrola závazku','LST053_0022','22','','""','0','1','LST059_0011','');
aps.apslist.newListItem('LST053','Dokoneení žádosti KK','LST053_0023','23','','""','0','1','','');
aps.apslist.newListItem('LST059','MV BL','LST059_0001','1','MVBL','PRF072','0','1','','');
aps.apslist.newListItem('LST059','MV CE','LST059_0002','2','MVCE','PRF073','0','1','','');
aps.apslist.newListItem('LST059','MV EMP','LST059_0003','3','MVBW','PRF074','0','1','','');
aps.apslist.newListItem('LST059','MV CIF','LST059_0004','4','MVCIF','PRF075','0','1','','');
aps.apslist.newListItem('LST059','MV SAL','LST059_0005','5','MVSAL','PRF076','0','1','','');
aps.apslist.newListItem('LST059','MV ADR','LST059_0006','6','MVADR','PRF077','0','1','','');
aps.apslist.newListItem('LST059','MV CBL','LST059_0007','7','MVCBL','PRF071','0','1','','');
aps.apslist.newListItem('LST059','MV CBL2','LST059_0008','8','MVCBL','','0','1','','');
aps.apslist.newListItem('LST059','MV CBL3','LST059_0009','9','MVCBL','','0','1','','');
aps.apslist.newListItem('LST059','MV CBL4','LST059_0010','10','MVCBL','','0','1','','');
aps.apslist.newListItem('LST059','MV CHECK','LST059_0011','11','Kontrola závazku','PRF116','0','1','','');
end;
/
begin
aps.apslist.newListItem('LST137','MIDAS_PAYMENT_ORDER','LST137_0010','','','','0','1','','');
end; 
/
commit;
/
@sladis

This comment has been minimized.

Copy link
Author

@sladis sladis commented Oct 3, 2019

I'm not sure how to put sql in there, tried as comment, I hope it will be usefull.

@alextercete

This comment has been minimized.

Copy link
Member

@alextercete alextercete commented Oct 3, 2019

@sladis Thanks, I've formatted your comment using markdown for you.

@alextercete

This comment has been minimized.

Copy link
Member

@alextercete alextercete commented Oct 3, 2019

@sladis I've managed to reproduce the issue, which doesn't seem to be related to the presence of Czech characters, but with the presence of two or more comment lines before a SQL*Plus SET statement.

For example, the following also reproduces the problem:

/*  Multi-line comment */
-- Inline comment
SET DEFINE OFF
@sladis

This comment has been minimized.

Copy link
Author

@sladis sladis commented Oct 3, 2019

Good job finding the issue,thanks! Is it flyway bug and will it be fixed?

@alextercete

This comment has been minimized.

Copy link
Member

@alextercete alextercete commented Oct 3, 2019

Yes, the fix will ship in the next release.

@alextercete alextercete added this to the Flyway 6.0.5 milestone Oct 3, 2019
@alextercete

This comment has been minimized.

Copy link
Member

@alextercete alextercete commented Oct 3, 2019

@sladis Thanks again for reporting and for your help with reproducing this!

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