Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: IB2017, "RELEASE SAVEPOINT" BUG?



Permlink Replies: 5 - Last Post: Sep 23, 2017 9:16 AM Last Post By: Jeff Overcash (...
Dmitry Kovalenko

Posts: 18
Registered: 10/1/07
IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 17, 2017 7:51 AM
Hello

I run some simple tests of IBProvider with InterBase 2017 and see again the very old problem with "RELEASE SAVEPOINT" statement

set transaction
savepoint a
commit retain
release savepoint a <---- EXECUTED WITHOUT ERROR!

set transaction
insert into NUM (TEST_ID) values (NULL)
savepoint a
commit retain
release savepoint a <---- OK. RETURNS ERROR "SAVEPOINT A UNKNOWN"

If I remember correctly, this bug was confirmed by FB team and was fixed in FB1.5 (~2004 year)

Regards,
Dmitry Kovalenko
www.ibprovider.com
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2017 12:36 PM   in response to: Dmitry Kovalenko in response to: Dmitry Kovalenko
Dmitry Kovalenko wrote:
Hello

I run some simple tests of IBProvider with InterBase 2017 and see again the very old problem with "RELEASE SAVEPOINT" statement

set transaction
savepoint a
commit retain
release savepoint a <---- EXECUTED WITHOUT ERROR!

set transaction
insert into NUM (TEST_ID) values (NULL)
savepoint a
commit retain
release savepoint a <---- OK. RETURNS ERROR "SAVEPOINT A UNKNOWN"

If I remember correctly, this bug was confirmed by FB team and was fixed in FB1.5 (~2004 year)

Regards,
Dmitry Kovalenko
www.ibprovider.com

It is questionable if this is a bug or not. In the first since no data was
written from the time of the transaction starting (or the last commit retaining)
and the commit retaining, keeping the savepoint makes sense.

In the second there is data written (granted before the save point is created)
and when a commit retaining actually makes writes invalidating all savepoints
prior to it makes sense. It might just be a performance reason they
invalidating all vs only those that had data written after the SP was created.
This is why I call it questionable. Technically that savepoint should still be
valid since it matches up with the transaction in terms of saved data just like
your first case.

Comparing it to FB makes no sense. This was a feature added after 6.0 so FB did
their own rules and implementation totally separate from InterBase.

Unfortunately there does not seem to be any documentation on the behavior in
this case of commit retaining and savepoints. I personally would say your no
error version should actually raise an error as you can not go back to a time
before the commit retaining was executed, but in that case since no data was
changed/written to I can see why it might be ok to let it stay.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Dmitry Kovalenko

Posts: 18
Registered: 10/1/07
Re: IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 19, 2017 11:18 PM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
I think (and sure) in both cases server must behave uniformly and return the error "SAVEPOINT A UNKNOWN".
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 20, 2017 10:47 AM   in response to: Dmitry Kovalenko in response to: Dmitry Kovalenko
Dmitry Kovalenko wrote:
I think (and sure) in both cases server must behave uniformly and return the error "SAVEPOINT A UNKNOWN".

Then file a bug report on it. I can see where the current version is right in
not invalidating the savepoint in the first case you presented, but if there was
a change it should probably be to the first case raising an error.

The exact rules unfortunately are not documented that I could find.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Dmitry Kovalenko

Posts: 18
Registered: 10/1/07
Re: IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 22, 2017 11:59 PM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
When I try open the qc.embarcadero.com, I get the ERR_CONNECTION_TIMED_OUT.
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: IB2017, "RELEASE SAVEPOINT" BUG?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 23, 2017 9:16 AM   in response to: Dmitry Kovalenko in response to: Dmitry Kovalenko
Dmitry Kovalenko wrote:
When I try open the qc.embarcadero.com, I get the ERR_CONNECTION_TIMED_OUT.

qc was replaced by quality portal several years ago.

https://quality.embarcadero.com/secure/Dashboard.jspa

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02