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

EXECUTE STATEMENT on EXTERNAL SOURCE does not check the status of the transaction [CORE2252] #2678

Closed
firebird-automations opened this issue Dec 22, 2008 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Alex Bekhtin (afgm)

Is related to QA376

execute block
returns (TRAN_ID integer)
as
declare variable DB_NAME TYPE OF COLUMN MON$ATTACHMENTS.MON
$ATTACHMENT_NAME;
begin
SELECT A.MON$ATTACHMENT_NAME FROM MON$ATTACHMENTS A
WHERE A.MON$ATTACHMENT_ID = CURRENT_CONNECTION
INTO :DB_NAME;

EXECUTE STATEMENT 'select CURRENT\_TRANSACTION from RDB$DATABASE'
ON EXTERNAL 'localhost/3051:' \|\| :DB\_NAME
AS USER 'SYSDBA' PASSWORD 'masterkey'
into :TRAN\_ID;

SUSPEND;

EXECUTE STATEMENT 'COMMIT WORK'
ON EXTERNAL 'localhost/3051:' \|\| :DB\_NAME
AS USER 'SYSDBA' PASSWORD 'masterkey';

EXECUTE STATEMENT 'select CURRENT\_TRANSACTION from RDB$DATABASE'
ON EXTERNAL 'localhost/3051:' \|\| :DB\_NAME
AS USER 'SYSDBA' PASSWORD 'masterkey'
into :TRAN\_ID;

SUSPEND;

end

Execute statement error at isc_dsql_fetch :335544569 : Dynamic SQL
Error
335544436 : SQL error code = -901
335544332 : invalid transaction handle (expecting explicit transaction
start)
Statement : select CURRENT_TRANSACTION from RDB$DATABASEData source :
Firebird::localhost/3051:C:\_DBASES\AAA_2.5.FDB.

Commits: 41896ee

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

Changed code to make output independent of ARCHITECTURE! In new database 1st executable statement will work:
within Tx = 4 for xClassic
within Tx = 5 for SuperServer
Because of this, output has been changed: instead of absolute Tx number we return only its SIGN.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA376 [ QA376 ]

@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

Test Details: Changed code to make output independent of ARCHITECTURE! In new database 1st executable statement will work:
within Tx = 4 for xClassic
within Tx = 5 for SuperServer
Because of this, output has been changed: instead of absolute Tx number we return only its SIGN.

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