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
Cannot compile source with "ELSE IF ( <expr> ) THEN" statement and commands to manupulate explicit cursor inside [CORE4929] #5220
Comments
Modified by: @pavel-zotovsummary: Can`t compile source which tries to manupulate with explicit cursor in " => Can`t compile source which "ELSE IF ( <expr> ) THEN" statement and commands to manupulating explicit cursor in it description: Test:show version; create or alter procedure sp_test1 as set term ^; declare v smallint; declare c1 cursor for ( declare c2 cursor for ( begin
end show procedure sp_test1; drop procedure sp_test1; Output:1) in 2.5.5:
|
Modified by: @pavel-zotovsummary: Can`t compile source which "ELSE IF ( <expr> ) THEN" statement and commands to manupulating explicit cursor in it => Can`t compile source which has "ELSE IF ( <expr> ) THEN" statement and commands to manupulating explicit cursor in it |
Commented by: @pavel-zotov PS. Seems that the problem is more serious. Following sample does NOT contain neither 'else' nor 'else if', but it also fails starting from 3.0.0.31374:show version; set term ^; declare v smallint; declare c1 cursor for ( begin
end show procedure sp_test1; drop procedure sp_test1;
|
Commented by: @pavel-zotov Finally I have: 1) fails: 2) works OK: 3) fails: |
Modified by: @dyemanovsummary: Can`t compile source which has "ELSE IF ( <expr> ) THEN" statement and commands to manupulating explicit cursor in it => Cannot compile source with "ELSE IF ( <expr> ) THEN" statement and commands to manupulate explicit cursor inside |
Commented by: @dyemanov Please test the new build. |
Commented by: @pavel-zotov LI-V3.0.0.32030 -- works fine. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovFix Version: 3.0 RC 1 [ 10584 ] |
Submitted by: @pavel-zotov
Test:
show version;
create or alter procedure sp_test1 as
begin
--- stub ---
end;
set term ^;
alter procedure sp_test1
as
declare v smallint;
declare c1 cursor for (
select 1 id from rdb$database
);
declare c2 cursor for (
select 2 id from rdb$database
);
begin
end
^
set term ;^
commit;
show procedure sp_test1;
drop procedure sp_test1;
commit;
Output:
1) in 2.5.5:
ISQL Version: WI-V2.5.5.26928 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.5.26928 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.5.26928 Firebird 2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.5.26928 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 11.2
Procedure text:
declare v smallint;
declare c1 cursor for (
select 1 id from rdb$database
);
declare c2 cursor for (
select 2 id from rdb$database
);
begin
end
2) in WI-T3.0.0.30809 (release of 3.0 Alpha-2): the same as in 2.5.5, i.e. all fine
3) since WI-T3.0.0.31374 (release of 3.0 Beta-1) and up to current builds:
ISQL Version: WI-T3.0.0.31374 Firebird 3.0 Beta 1
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-T3.0.0.31374 Firebird 3.0 Beta 1"
Firebird/Windows/Intel/i386 (remote server), version "WI-T3.0.0.31374 Firebird 3.0 Beta 1/tcp (csprog)/P13"
Firebird/Windows/Intel/i386 (remote interface), version "WI-T3.0.0.31374 Firebird 3.0 Beta 1/tcp (csprog)/P13"
on disk structure version 12.0
Statement failed, SQLSTATE = 2F000
Error while parsing procedure SP_TEST1's BLR
-invalid request BLR at offset 208
-BLR syntax error: expected end_of_command at offset 209, encountered 255
After line 8 in file blr.2p.sql
Procedure text:
begin
--- stub ---
end
Problem is caused by "else if (expr)", see lines marked as [ 1] and [ 2 ]. If we remove or comment them, all works OK.
Commits: a8496bc 5b57c14 FirebirdSQL/fbt-repository@ea60bbc FirebirdSQL/fbt-repository@dbb48dd
The text was updated successfully, but these errors were encountered: