Subject | Re: [firebird-support] The PHP default transaction |
---|---|
Author | Lester Caine |
Post date | 2016-01-24T12:06:36Z |
On 21/01/16 10:44, Tim Ward tdw@... [firebird-support] wrote:
on this. Should probably be a discussion for the firebird-php list, but
I think we do need some help from the 'experts' to establish what the
default setup on the PHP driver should be. The PDO driver seems to have
a few problems as well, but I don't find that as flexible due to it's
trying to make even databases without transactions look like ones that
do have them.
I've been using ADOdb since day one for my abstraction layer and this
has allowed borrowing from projects that were only written for other
engines. I've also ported a few bits to Firebird simply by converting
them to ADOdb. I've got a ported version of the adodb-firebird driver
which also uses the fbird_ aliases and is better matched to the firebird
metadata SQL
My starting point ... which seems to work
$this->ibasetrans = IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED;
Rather than the default
IBASE_WRITE | IBASE_CONCURRENCY | IBASE_WAIT
But I would appreciate some feedback as to how this fits with later
versions of Firebird. I was running fb1.0 and 1.5 when I started using
this :)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
> (1) Is this likely to be the "default transaction" that PHP creates forSorry Tim ... have been out and about and needed to sit down to expand
> a connection if you don't do an explicit start transaction? Ie, does PHP
> create the default transaction for a connection even if you never use it
> (rather than create it on first use, as one might have hoped)?
>
> (2) What, if anything, is the import of a transaction being marked
> "inactive"? Does an "inactive" transaction still freeze the various
> transaction counters and hold up garbage collection?
>
> (3) If the answer to (2) is that the existence of this transaction *is*
> a potential performance problem, I imagine I can get rid of it simply by
> doing "ibase_commit();" at the start of the PHP script?
on this. Should probably be a discussion for the firebird-php list, but
I think we do need some help from the 'experts' to establish what the
default setup on the PHP driver should be. The PDO driver seems to have
a few problems as well, but I don't find that as flexible due to it's
trying to make even databases without transactions look like ones that
do have them.
I've been using ADOdb since day one for my abstraction layer and this
has allowed borrowing from projects that were only written for other
engines. I've also ported a few bits to Firebird simply by converting
them to ADOdb. I've got a ported version of the adodb-firebird driver
which also uses the fbird_ aliases and is better matched to the firebird
metadata SQL
My starting point ... which seems to work
$this->ibasetrans = IBASE_WAIT | IBASE_REC_VERSION | IBASE_COMMITTED;
Rather than the default
IBASE_WRITE | IBASE_CONCURRENCY | IBASE_WAIT
But I would appreciate some feedback as to how this fits with later
versions of Firebird. I was running fb1.0 and 1.5 when I started using
this :)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk