Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current connection may be used by EXECUTE STATEMENT instead of creation of new attachment [CORE2729] #3124

Closed
firebird-automations opened this issue Nov 3, 2009 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Is related to QA421

create user test password 'test';
commit;

execute block
returns (o_att_id int, o_user varchar(32))
as
begin
o_att_id = CURRENT_CONNECTION;
o_user = CURRENT_USER;
suspend;

-- should use current connection
execute statement 'select CURRENT_CONNECTION, CURRENT_USER from rdb$database'
into :o_att_id, :o_user;
suspend;

-- should use distinct connection
execute statement 'select CURRENT_CONNECTION, CURRENT_USER from rdb$database'
as user 'test' password 'test'
into :o_att_id, :o_user;
suspend;
end

All 3 rows returns the same values while 3rd row must not return the same values as 1st and 2nd.

Commits: 209767c b18ffff

====== Test Details ======

Updated code: made STDOUT insensible to the IDs of attaches

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10362 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5 RC2 [ 10372 ]

Fix Version: 2.5 RC1 [ 10362 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.5 RC1 [ 10362 ]

Fix Version: 2.5 RC2 [ 10372 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA421 [ QA421 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Simple modification of this test:

set list on;
set term ^;
execute block returns (
user_on_start varchar(32),
user_on_extds varchar(32),
same_attach char(1)
) as
declare v_att_ini int;
declare v_att_eds int;
begin

user\_on\_start = current\_user;
v\_att\_ini = current\_connection;

execute statement 'select current\_user, current\_connection from rdb$database'
into  :user\_on\_extds, :v\_att\_eds;


same\_attach = iif\( v\_att\_ini = v\_att\_eds, 'Y', 'N'\);
suspend;

execute statement 'select current\_user, current\_connection from rdb$database'
as user 'test' password 'test'
into :user\_on\_extds, :v\_att\_eds;

same\_attach = iif\( v\_att\_ini = v\_att\_eds, 'Y', 'N'\);
suspend;

end
^
set term ;^
commit;

-- leads to crash of SuperClassic WI-T6.3.0.31698

The problem is in this statement:

execute statement 'select current\_user, current\_connection from rdb$database'
as user 'test' password 'test'
into :user\_on\_extds, :v\_att\_eds;

===

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

If you really observe the crash - why do you post it here ? Create new ticket, please.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

CORE4705

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

Test Details: Updated code: made STDOUT insensible to the IDs of attaches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment