
Key: |
CORE-5012
|
Type: |
Bug
|
Status: |
Open
|
Priority: |
Major
|
Assignee: |
Unassigned
|
Reporter: |
Pavel Zotov
|
Votes: |
0
|
Watchers: |
2
|
If you were logged in you would be able to see more operations.
|
|
|
Test:
====
set term ^;
execute block as begin
execute statement 'create or alter view v_foo as select 1 id from rdb$database where 1=1 -- and 2=2' ;
end
^
set term ;^
commit;
create or alter view v_bar as select 2 id from rdb$database where 1=1 -- and 2=2
-- ... plus very clever comment after the last line of query
-- but before semicolon, so it should be saved in our database.
;
commit;
===
Run:
====
C:\MIX\firebird\fb25\bin\isql /3255:e25 -i createview.sql & C:\MIX\firebird\fb25\bin\isql /3255:e25 -x 1>createview_25.log
Output:
======
SET SQL DIALECT 3;
/* CREATE DATABASE '/3255:e25' PAGE_SIZE 4096 DEFAULT CHARACTER SET NONE */
/* View: V_FOO, Owner: SYSDBA */
CREATE VIEW V_FOO (ID) AS
select 1 id from rdb$database where 1=1 -- and 2=2;
/* View: V_BAR, Owner: SYSDBA */
CREATE VIEW V_BAR (ID) AS
select 2 id from rdb$database where 1=1 -- and 2=2
-- ... plus very clever comment after the last line of query
-- but before semicolon, so it should be saved in our database.
;
Extracted metadata can NOT be compiled: note that semicolon after 1st view (V_FOO) is included in the inlined comment that was injected to view DDL in ES expression. Two views in fact have no separator between their DDL.
Good news is that any comment before final ";" APPEARS in extracted metadata script. This is not so in FB 3.0 but - IMO - this should be another ticket.
PS.
ISQL Version: WI-V2.5.5.26952 Firebird 2.5
Server version:
WI-V2.5.5.26952 Firebird 2.5
WI-V2.5.5.26952 Firebird 2.5/tcp (csprog)/P12
WI-V2.5.5.26952 Firebird 2.5/tcp (csprog)/P12
|
Description
|
Test:
====
set term ^;
execute block as begin
execute statement 'create or alter view v_foo as select 1 id from rdb$database where 1=1 -- and 2=2' ;
end
^
set term ;^
commit;
create or alter view v_bar as select 2 id from rdb$database where 1=1 -- and 2=2
-- ... plus very clever comment after the last line of query
-- but before semicolon, so it should be saved in our database.
;
commit;
===
Run:
====
C:\MIX\firebird\fb25\bin\isql /3255:e25 -i createview.sql & C:\MIX\firebird\fb25\bin\isql /3255:e25 -x 1>createview_25.log
Output:
======
SET SQL DIALECT 3;
/* CREATE DATABASE '/3255:e25' PAGE_SIZE 4096 DEFAULT CHARACTER SET NONE */
/* View: V_FOO, Owner: SYSDBA */
CREATE VIEW V_FOO (ID) AS
select 1 id from rdb$database where 1=1 -- and 2=2;
/* View: V_BAR, Owner: SYSDBA */
CREATE VIEW V_BAR (ID) AS
select 2 id from rdb$database where 1=1 -- and 2=2
-- ... plus very clever comment after the last line of query
-- but before semicolon, so it should be saved in our database.
;
Extracted metadata can NOT be compiled: note that semicolon after 1st view (V_FOO) is included in the inlined comment that was injected to view DDL in ES expression. Two views in fact have no separator between their DDL.
Good news is that any comment before final ";" APPEARS in extracted metadata script. This is not so in FB 3.0 but - IMO - this should be another ticket.
PS.
ISQL Version: WI-V2.5.5.26952 Firebird 2.5
Server version:
WI-V2.5.5.26952 Firebird 2.5
WI-V2.5.5.26952 Firebird 2.5/tcp (csprog)/P12
WI-V2.5.5.26952 Firebird 2.5/tcp (csprog)/P12 |
Show » |
There are no comments yet on this issue.
|
|