Issue Details (XML | Word | Printable)

Key: CORE-4764
Type: Bug Bug
Status: Open Open
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Removal of leading whitespaces before first 'BEGIN' from SP source

Created: 21/Apr/15 07:18 AM   Updated: 28/Apr/15 03:45 PM
Component/s: None
Affects Version/s: 3.0 Beta 1
Fix Version/s: None


 Description  « Hide
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 ?


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 28/Apr/15 03:45 PM
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.