Metadata extration (ISQL -X): "CREATE PROCEDURE" statement contains reference
to column of table(s) that not yet exists if this procedure had parameter of
such type when it was created
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-5089
URL: http://tracker.firebirdsql.org/browse/CORE-5089
Project: Firebird Core
Issue Type: Bug
Components: ISQL
Affects Versions: 3.0 RC1
Reporter: Pavel Zotov
Create new database and apply this script:
===
create or alter procedure sp_test (ix int) returns(ox int) as begin end;
commit;
recreate table test(
x int
);
commit;
set term ^;
alter procedure sp_test(
ix type of column test.x
)
returns(
ox type of column test.x
) as
begin
/* foo */
end
^
set term ;^
commit;
===
Then run: ISQL -X this_database.fdb 1>metadata.log
File "metadata.log" will contain following rows:
===
SET SQL DIALECT 3;
/* CREATE DATABASE '/3333:e30' PAGE_SIZE 8192 DEFAULT CHARACTER SET NONE; */
COMMIT WORK;
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures headers */
CREATE OR ALTER PROCEDURE SP_TEST (IX TYPE OF COLUMN TEST.X)
------------------------------------------ [ 1 ]
RETURNS (OX TYPE OF COLUMN TEST.X)
---------------------------------------------------------------------------------------
[ 2 ]
AS
BEGIN EXIT; END ^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
/* Table: TEST, Owner: SYSDBA */
CREATE TABLE TEST (X INTEGER);
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures bodies */
ALTER PROCEDURE SP_TEST (IX TYPE OF COLUMN TEST.X)
RETURNS (OX TYPE OF COLUMN TEST.X)
AS
begin
/* foo */
end ^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
===
This script will not be compiled because of invalid references marked as [ 1 ]
and [ 2 ].
PS. Found while preparing test for CORE-2792; I'm not sure that this issue
should be added there thus created new ticket.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel