
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Found and Tested on MS Windows XP (Firebird-2.5.0.26074_1_Win32) and Server 2008 (Firebird-2.5.0.26074_1_x64 )
|
|
Issue Links:
|
Relate
|
|
|
|
This issue is related to:
|
|
|
|
|
|
|
|
| Planning Status: |
Unspecified
|
|
The Behaviour about a where statement with static content have change from Firebird 1.5/2.1 to 2.5 and have a massiv impact in our case. The static statement like (select sValue From spr_test('SIMSIM')) is evaluated 1 time in firebird 1.5 and 2.1, the number of row in the from-clause with firebird 2.5 (about 45'000 in our case).
You can test it with the following script:
-------------------------------------------------------------------------------
-- Init
-------------------------------------------------------------------------------
Create Table tt_table(Field1 varchar(100));
go
Create Or Alter PROCEDURE SPR_TEST (pName Varchar(2000)) RETURNS (sValue Varchar(255)) AS
BEGIN
Insert Into tt_table(field1) values(:pName);
sValue=:pName;
suspend;
End
go
-------------------------------------------------------------------------------
-- Call procedure
-------------------------------------------------------------------------------
Select count(*)
from rdb$types
where rdb$field_name like (select sValue From spr_test('SIMSIM'))
go
-------------------------------------------------------------------------------
-- Result is 1 with Firebird 1.5 and 2.1, 225 with Firebird 2.5
-------------------------------------------------------------------------------
Select count(*) From tt_table
go
-------------------------------------------------------------------------------
-- Clean
-------------------------------------------------------------------------------
Drop Procedure spr_test
go
Drop Table tt_table
go
Thank you for your big work with Firebird, its a very good thing!
|
|
Description
|
The Behaviour about a where statement with static content have change from Firebird 1.5/2.1 to 2.5 and have a massiv impact in our case. The static statement like (select sValue From spr_test('SIMSIM')) is evaluated 1 time in firebird 1.5 and 2.1, the number of row in the from-clause with firebird 2.5 (about 45'000 in our case).
You can test it with the following script:
-------------------------------------------------------------------------------
-- Init
-------------------------------------------------------------------------------
Create Table tt_table(Field1 varchar(100));
go
Create Or Alter PROCEDURE SPR_TEST (pName Varchar(2000)) RETURNS (sValue Varchar(255)) AS
BEGIN
Insert Into tt_table(field1) values(:pName);
sValue=:pName;
suspend;
End
go
-------------------------------------------------------------------------------
-- Call procedure
-------------------------------------------------------------------------------
Select count(*)
from rdb$types
where rdb$field_name like (select sValue From spr_test('SIMSIM'))
go
-------------------------------------------------------------------------------
-- Result is 1 with Firebird 1.5 and 2.1, 225 with Firebird 2.5
-------------------------------------------------------------------------------
Select count(*) From tt_table
go
-------------------------------------------------------------------------------
-- Clean
-------------------------------------------------------------------------------
Drop Procedure spr_test
go
Drop Table tt_table
go
Thank you for your big work with Firebird, its a very good thing!
|
Show » |
|
CORE-2893.