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

Removal of leading whitespaces before first 'BEGIN' from SP source [CORE4764] #5065

Open
firebird-automations opened this issue Apr 21, 2015 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

This code:

set term ^;
create or alter procedure sp_test(x int, y int) returns(z bigint) as
begin
z=x+y;
suspend;
end
^
set term ;^
commit;
set blob all;
set list on;
select replace(replace(rdb$procedure_source,' ','.'), ascii_char(9), '.') sp_src
from rdb$procedures
where rdb$procedure_name = upper('sp_test');

-- produces:

1) on 2.1.7 and 2.5.5:
SP_SRC 0:4
................begin
..................z=x+y;
..................suspend;
................end

2) on 2.0.7 and 3.0:
SP_SRC 0:4
begin
..................z=x+y;
..................suspend;
................end

So, leading whitespaces that were left side of starting 'BEGIN' keyword, are removed in 3.0.

Is it possible to store source code without any distortion ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

When 2.1.7 and 2.5.5 removes the line break (after "as") but does not remove the spaces, they are even more wrong.

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

1 participant