Subject Re: Next transaction /only/ increments
Author Edwin Pratomo
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
> Add some COMMITs. :-) Just make sure they are hard COMMIT calls, not COMMIT
RETAINING.
>
> I don't know the DBD::InterBase driver but it's not uncommon for driver
interfaces to default to performing what's sometimes called "Autocommit".
Usually, this is implemented with COMMIT RETAINING, not a hard COMMIT. COMMIT
RETAINING causes the behaviour you have described and you are quite right to be
concerned about its sins with regard to garbage collection...
>
> ./heLen
>

good day helen and all,

I've just looked into problem related with DBD::InterBase reported on
http://rt.cpan.org/Public/Bug/Display.html?id=30812
which leads to this thread.

it's not about AutoCommit implementation, because DBD::InterBase does hard
commit, unless the user chooses to do soft commit.
a db connection with a single transaction doing only a single select will
exhibit that stuck OIT behaviour. you can try api3.c example included in
Firebird distribution to see this.

attached is a simple C program (based on api3.c) and a bash script which
produces the following result:

[edwin@localhost stuck-oit]$ ./stuck-oit.sh
Oldest transaction 1
Oldest active 2
Next transaction 3
Bumped transaction 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
SELECT result: 1
Oldest transaction 1
Oldest active 2
Next transaction 13
Bumped transaction 1


this leads me to a question: is this behaviour expected?

rgds,
Edwin.


________________________________________________________
Bergabunglah dengan orang-orang yang berwawasan, di di bidang Anda! Kunjungi Yahoo! Answers saat ini juga di http://id.answers.yahoo.com/

[Non-text portions of this message have been removed]