Skip to content

Firebird 5 profiler error with subselects #7553

@tonne1

Description

@tonne1

Testing profiler with WI-T5.0.0.973 Firebid 5.0 Beta 1. It seems to handle subselects incorrectly. This test case

`set term !;
execute block
as
declare dummy varchar(200);
declare num bigint;
begin
select rdb$profiler.start_session('Profile Session 1') from rdb$database into :num;

num = 1;
if (:num in (select rdb$linger from rdb$database)) then
dummy = 'xxx';

execute procedure rdb$profiler.finish_session(true);
end!
set term ;!`

fails to write profile data to the snapshot tables and creates a message in firebird.log like e.g.:

Profiler flush
violation of FOREIGN KEY constraint "PLG$PROF_RECORD_SOURCES_CURSOR_FK" on table "PLG$PROF_RECORD_SOURCES"
Foreign key reference target does not exist
Problematic key value is ("PROFILE_ID" = 56, "STATEMENT_ID" = 41327, "CURSOR_ID" = 2)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions