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

connection lost to database when used AUTONOMOUS TRANSACTION [CORE2042] #2478

Closed
firebird-automations opened this issue Aug 14, 2008 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Alex Bekhtin (afgm)

Is related to QA360

SET TERM ^ ;

CREATE PROCEDURE GET_CALLER_NAME
RETURNS (
OBJECT_NAME CHAR(31),
OBJECT_TYPE SMALLINT)
AS
declare variable tran_id integer;
begin
TRAN_ID = CURRENT_TRANSACTION;

IN AUTONOMOUS TRANSACTION DO
BEGIN
select first 1 skip 1 CS.mon$object_name, CS.mon$object_type
from mon$call_stack CS, mon$statements ST
where
CS.mon$statement_id = ST.mon$statement_id
AND ST.mon$transaction_id = :TRAN_ID
order by CS.mon$call_id ascending
into :OBJECT_NAME, :OBJECT_TYPE;
END

SUSPEND;
end^

CREATE PROCEDURE TEST_CALLER_NAME
RETURNS (
OBJECT_NAME CHAR(31),
OBJECT_TYPE SMALLINT)
AS
begin
select OBJECT_NAME, OBJECT_TYPE from GET_CALLER_NAME
into :OBJECT_NAME, :OBJECT_TYPE;

SUSPEND;
end^

SET TERM ; ^
----------------------------------
SQL> select * from TEST_CALLER_NAME;

OBJECT_NAME OBJECT_TYPE
=============================== ===========
TEST_CALLER_NAME 5

SQL> select * from TEST_CALLER_NAME;
...
SQL> select * from TEST_CALLER_NAME;
...
SQL> COMMIT WORK;
Statement failed, SQLSTATE = 08006
connection lost to database
Statement failed, SQLSTATE = 08006
connection lost to database

Commits: 49c1957

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA360 [ QA360 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

QA test added.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

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

No branches or pull requests

2 participants