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
AV at engine when some statement under autonomous transaction dropped transaction level savepoint [CORE2558] #2968
Comments
Commented by: @hvlad Extract database backup, restore it and run query : execute procedure test_trans; |
Modified by: @hvladAttachment: cto.zip [ 11475 ] |
Commented by: @hvlad It seems autonomous transaction must start its own savepoint right after transaction start. In user application it is started by EXE_start when request begins its execution. But in autonomous transaction case request is already executing. Proposed patch is : cvs -z9 diff -u -wb -- dsql\StmtNodes.cpp (in directory C:\FB2\fb25.trace\src\)
|
Commented by: @asfernandes Vlad, I had doubts if that is a fix for the root of the problem. 1) Many places verify !NULL tra_save_point, so it seams as a valid case But if it executes, looks like VIO_verb_cleanup could leave a NULL tra_save_point outside of an autonomous transaction. Therefore, I suggest these changes: Index: src/jrd/exe.cppRCS file: /cvsroot/firebird/firebird2/src/jrd/exe.cpp,v - if (transaction != dbb->dbb_sys_trans) /* Handle pre-operation trigger */ - if (transaction != dbb->dbb_sys_trans) {
@@ -3009,7 +3008,7 @@ static jrd_nod* modify(thread_db* tdbb, - if (transaction != dbb->dbb_sys_trans)
@@ -3069,9 +3068,8 @@ static jrd_nod* modify(thread_db* tdbb, - if (transaction != dbb->dbb_sys_trans) {
@@ -3790,7 +3788,7 @@ static jrd_nod* store(thread_db* tdbb, j - if (transaction != dbb->dbb_sys_trans)
@@ -3860,9 +3858,8 @@ static jrd_nod* store(thread_db* tdbb, j - if (transaction != dbb->dbb_sys_trans) {
|
Commented by: @asfernandes Hey, Vlad, as my patch didn't crash but rollbacks the inserted records :-), I'd say your is ok. ;-) |
Commented by: @hvlad Good to hear that one of patches is ok ;) I'm waiting for Dmitry's comment as he know savepoints code very well and could verify my patch. |
Commented by: @dyemanov I agree with the patch. |
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC1 [ 10362 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Not enough information Test Details: "Could not find the specified attachment on the server" |
Submitted by: @hvlad
Attachments:
cto.zip
Commits: 4d1e602 7964c35
====== Test Details ======
"Could not find the specified attachment on the server"
The text was updated successfully, but these errors were encountered: