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

Rollback to wrong savepoint if several exception handlers on the same level are executed [CORE4424] #4745

Closed
firebird-automations opened this issue May 9, 2014 · 16 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @aafemt

Assigned to: @aafemt

Is related to CORE3275

Attachments:
s_test.sql

Votes: 3

The engine is not correct processing cases where multiple WHEN handlers are at the same level, as in:

execute block as
declare variable a integer;
begin
update s_test set f=2;
begin
update s_test set f=3;
begin
update s_test set f=4;
begin
update s_test set f=5;
begin
update s_test set f=6;
begin
update s_test set f=10;
end
end
end
when gdscode arith_except do insert into errs (f, msg) select f, 'gdscode '||gdscode from s_test;
when sqlcode -802 do insert into errs (f, msg) select f, 'sqlcode '||sqlcode from s_test;
when any do insert into errs (f, msg) select f, 'any' from s_test;
when any do a=1/0;
end
when any do insert into errs (f, msg) select f, 'any2' from s_test;
end
end

The attached script produces result "2" instead of expected "3".

Commits: 27395a0 FirebirdSQL/fbt-repository@0ae7bde

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

Works OK, last letter from dimitr: 25 мар. в 20:47

@firebird-automations
Copy link
Collaborator Author

Modified by: @aafemt

Attachment: s_test.sql [ 12512 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Added more details from the attachment, simply referring to the attachment doesn't provide the reader any meaningful context.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

description: Attached script produces result "2" instead of expected "3". => The engine is not correct processing cases where multiple WHEN handlers are at the same level, as in:

execute block as
declare variable a integer;
begin
update s_test set f=2;
begin
update s_test set f=3;
begin
update s_test set f=4;
begin
update s_test set f=5;
begin
update s_test set f=6;
begin
update s_test set f=10;
end
end
end
when gdscode arith_except do insert into errs (f, msg) select f, 'gdscode '||gdscode from s_test;
when sqlcode -802 do insert into errs (f, msg) select f, 'sqlcode '||sqlcode from s_test;
when any do insert into errs (f, msg) select f, 'any' from s_test;
when any do a=1/0;
end
when any do insert into errs (f, msg) select f, 'any2' from s_test;
end
end

The attached script produces result "2" instead of expected "3".

@firebird-automations
Copy link
Collaborator Author

Modified by: @aafemt

Link: This issue is related to CORE3275 [ CORE3275 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @aafemt

Fix Version: 4.0 Initial [ 10621 ]

assignee: Dimitry Sibiryakov [ aafemt ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @aafemt

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @sim1984

You have to commit part of Firebird 4.0 Alpha 1 is fixed, and a part in Firebird 4.0 Inintial. Do so at some one.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 4.0 Initial [ 10621 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> The attached script produces result "2" instead of expected "3".

Script from attach still produces:

       F 

============
2

       F MSG                            

============ ==============================
2 any2

So, why this ticket has "Resolution: Fixed " ?

PS.

ISQL Version: WI-T4.0.0.32371 Firebird 4.0 Unstable
Server version:
Firebird/Windows/Intel/i386 (access method), version "WI-T4.0.0.32371 Firebird 4.0 Unstable"
Firebird/Windows/Intel/i386 (remote server), version "WI-T4.0.0.32371 Firebird 4.0 Unstable/tcp (csprog)/P13"
Firebird/Windows/Intel/i386 (remote interface), version "WI-T4.0.0.32371 Firebird 4.0 Unstable/tcp (csprog)/P13"
on disk structure version 12.0

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Because it is fixed in build 32373. Snapshots on official site are outdated for 4.0 branch.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

WI-V3.0.0.32375 (I took it from site just now: 2016-03-04 15:38:34 Firebird-3.0.0.32375-0_Win32.7z 7 MB) - result the same as on 32371.

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Look carefully: this issue is not fixed in version 3.0, only in 4.0.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred

Test Details: Found troubles, waiting for reply on report that was sent to Dimitry Sibiryakov & dimitr 05-mar-2016 11:28

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: Found troubles, waiting for reply on report that was sent to Dimitry Sibiryakov & dimitr 05-mar-2016 11:28 => Found troubles, waiting for investigation by dimitr, last letter: 05-mar-2016 16:01.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done successfully

Test Details: Found troubles, waiting for investigation by dimitr, last letter: 05-mar-2016 16:01.

=>

Works OK, last letter from dimitr: 25 мар. в 20:47

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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