Subject | Re: [firebird-support] Re: Dependancies not enforced |
---|---|
Author | Jason Dodson |
Post date | 2006-04-03T12:40:50Z |
Adam,
This is obviously a "clean" test case. Likely in a clean database, but more importantly, with table definitions that
were put into play. Just because the clean test fails is no justification to drop it as -irreproducible-
I will track down when I made made these changes, and restore the backup from before I made the type change. So long as
it breaks again, I will file a bug report, with a test case.
Jason
Adam wrote:
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
This is obviously a "clean" test case. Likely in a clean database, but more importantly, with table definitions that
were put into play. Just because the clean test fails is no justification to drop it as -irreproducible-
I will track down when I made made these changes, and restore the backup from before I made the type change. So long as
it breaks again, I will file a bug report, with a test case.
Jason
Adam wrote:
> wrote:--
>> Hey Helen,
>>
>> It is a lot simpler than that. I had a table which was defined
> similar to this:
>> Create Table MyTable
>> ( ...
>> MyField Numeric(15,2)
>> ...
>> )
>>
>> MyTable.MyField was referenced by a a stored procedure. I was able
> to change the datatype with a symple:
>> Alter Table MyTable
>> Alter MyField Type Double Precision;
>>
>> Jason
>
> Hi Jason,
>
> I have just produced a test case using the information you provided,
> and as Helen points out, Firebird correctly refuses the alter table
> statement.
>
> I have provided it below so you can confirm it is the same as what you
> were thinking.
>
> ----- Run in iSQL
>
> -- Create table with numeric field
>
> CREATE TABLE TEST
> (
> ID Numeric(15,2)
> );
>
> COMMIT;
>
> -- Create procedure with dependency on numeric field
>
> SET TERM ^ ;
>
> CREATE PROCEDURE SP_TEST
> RETURNS
> (
> ID Numeric(15,2)
> )
> AS
> BEGIN
> SELECT FIRST 1 ID FROM TEST INTO :ID;
> SUSPEND;
> END
> ^
>
> SET TERM ; ^
>
> COMMIT;
>
> -- Change data type of numeric field
>
> ALTER TABLE TEST ALTER ID TYPE DOUBLE PRECISION;
>
> COMMIT;
>
> ----- End of iSQL script
>
> Results:
>
> SQL> ALTER TABLE TEST ALTER ID TYPE DOUBLE PRECISION;
> Statement failed, SQLCODE = -607
>
> unsuccessful metadata update
> -Column ID from table TEST is referenced in SP_TEST
>
> -----
>
> Is there something else at play in your scenario? Perhaps the
> dependency is in a statement that is built at runtime via execute
> statement? (in which case Firebird would have no way of knowing the
> dependency at the time alter table is called)
>
> Adam
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
The information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.