Hey:
I was working on persistent PDO supports in phpng..
and you may already know this odds behavior:
<?php
class Foo extends PDO {
}
class Baz extends PDO {
}
$bar = new Foo("sqlite::memory:", null, null,
array(PDO::ATTR_PERSISTENT => true));
$baz = new Baz("sqlite::memory:", null, null,
array(PDO::ATTR_PERSISTENT => true));
var_dump($bar);
var_dump($baz);
?>
it output :
object(Foo)#1 (0) {
}
object(Foo)#2 (0) {
}
which seems very odds for me...
anyway after the new implementation. this has been fixed , in
phpng it outputs:
object(Foo)#1 (0) {
}
object(Baz)#2 (0) {
}
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
if no. then I will leave the current fix as it is...
thanks
Laruence Xinchen Hui
http://www.laruence.com/
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
if no. then I will leave the current fix as it is...
See here f.e. https://bugs.php.net/bug.php?id=47407
--
Regards,
Mike
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
if no. then I will leave the current fix as it is...
See here f.e. https://bugs.php.net/bug.php?id=47407
Hmm, from what I see, that implies it is a bug? (I also think it's a
bug anyway)
thanks
--
Regards,
Mike
--
Laruence Xinchen Hui
http://www.laruence.com/
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
if no. then I will leave the current fix as it is...
See here f.e. https://bugs.php.net/bug.php?id=47407
Hmm, from what I see, that implies it is a bug? (I also think it's a
bug anyway)
Yes, I'd definitely see it as bug, too.
--
Regards,
Mike
Hi!
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
No, I don't think it's on purpose, it looks like a bug.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Hi!
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
No, I don't think it's on purpose, it looks like a bug.
Okey, then I am going to fix the tests (only in phpng)
thanks
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
--
Laruence Xinchen Hui
http://www.laruence.com/
On Tue, May 27, 2014 at 5:20 AM, Stas Malyshev smalyshev@sugarcrm.com
wrote:Hi!
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
No, I don't think it's on purpose, it looks like a bug.
Okey, then I am going to fix the tests (only in phpng)
Hm... Well... Not too good. But at least use the bug # in the commit
message.
Cheers,
Pierre
I am just not sure, is the previous behavior is on purpose? or
any other reasons?
No, I don't think it's on purpose, it looks like a bug.
PDO has a few simple assumptions, such as only allowing one connection
per transaction, which is fine for most engines, but Firebird/Interbase
has a very useful cross database transaction mechanism which PDO can not
support. Persistent connections are another are where it's how the
engine implements this which is the 'problem' as much as what PDO does.
What 'persist' says is basically say 'use an existing connection' so how
does sqlite actually support connection pooling? A quick scan of the
sqlite manual would suggest that it requires fully thread safe operation
to do that, and that you need a later version of sqlite. So is this an
engine specific problem or a problem with the way PDO tries to simplify
the connection model?
--
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