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

ALTER SESSION RESET does not work in ISQL, results in error "Cannot reset user session - There are open transactions (2 active)" [CORE6384] #6623

Closed
firebird-automations opened this issue Aug 7, 2020 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

As isql uses two transactions, it is not possible to execute ALTER SESSION RESET. Doing so results in the following error:

D:\DevSoft\FB_tests\Firebird-4.0.0.2133-0_x64>isql -user sysdba -password masterkey localhost:employee
Database: localhost:employee, User: SYSDBA
SQL> alter session reset;
Statement failed, SQLSTATE = 01002
Cannot reset user session
-There are open transactions (2 active)
SQL>

Given the requirement that there is no active transaction (or only the current transaction executing ALTER SESSION RESET), it looks like ISQL needs to get special treatment for handling ALTER SESSION RESET, for example on detection of ALTER SESSION RESET, commit both transaction, or something similar.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Why not using SET AUTODDL OFF if you need to execute ALTER SESSION RESET?

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Mark, please, don't start it over again.

Re-read discussion in fb-devel "[Firebird-devel] ALTER SESSION RESET not allowed if there are transactions?" started by you at 2 jun 2018
where you explicitly agrees with implementation (see last two messages).

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

Well, to be honest, I had forgotten about that discussion, and reading it back my primary focus in that discussion was on the behaviour for Jaybird and drivers, and not isql.

When I was trying out something in isql yesterday, I was quite surprised by the error when executing ALTER SESSION RESET. I think using SET AUTODDL OFF is not a solution/workaround that is immediately obvious. At minimum it I think it needs to be explicitly mentioned in section ALTER SESSION RESET of the release notes.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

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

1 participant