Bug #47407 [Asn->Csd]: There can be only one PDO (derived) instance with ATTR_PERSISTENT
| From: | dmitry@php.net | Date: | Fri, 15 Aug 2014 05:02:42 +0000 |
| Subject: | Bug #47407 [Asn->Csd]: There can be only one PDO (derived) instance with ATTR_PERSISTENT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187137@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=47407&edit=1
ID: 47407
Updated by: dmitry@php.net
Reported by: dennis at born05 dot nl
Summary: There can be only one PDO (derived) instance with
ATTR_PERSISTENT
-Status: Assigned
+Status: Closed
Type: Bug
Package: PDO Core
Operating System: Fedora Core 6
PHP Version: 5.2, 5.3, trunk
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3a1f79d51d81d3a2b0bd70bdf986fa192c53c56b
Log: Fixed bug #47407
Previous Comments:
------------------------------------------------------------------------
[2014-05-27 06:29:13] mike@php.net
It's fixed "only" in phpng, so let's keep it open until/when phpng gets merged.
------------------------------------------------------------------------
[2014-05-27 03:50:28] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3a1f79d51d81d3a2b0bd70bdf986fa192c53c56b
Log: Fixed bug #47407
------------------------------------------------------------------------
[2010-06-21 23:47:55] felipe@php.net
5.2SVN:
object(MyPDO)#1 (0) {
}
object(MyPDO)#2 (0) {
}
[Mon Jun 21 18:46:40 2010] Script: '../bug.php'
/home/felipe/dev/php5_2/ext/pdo/pdo_dbh.c(1517) : Freeing 0x0864D85C (44 bytes), script=../bug.php
[Mon Jun 21 18:46:40 2010] Script: '../bug.php'
/home/felipe/dev/php5_2/ext/pdo/pdo_dbh.c(1518) : Freeing 0x0864ED0C (32 bytes), script=../bug.php
/home/felipe/dev/php5_2/Zend/zend_alloc.c(2391) : Actual location (location was relayed)
=== Total 2 memory leaks detected ===
5.3SVN:
object(PDO)#1 (0) {
}
object(PDO)#2 (0) {
}
------------------------------------------------------------------------
[2009-02-16 12:53:48] dennis at born05 dot nl
Description:
------------
When you create 2 or more instances of PDO (or derived) with
ATTR_PERSISTENT you end up with several references to only one
object.
Reproduce code:
---------------
<?php
class MyPDO extends PDO {}
$bar = new PDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));
$baz = new MyPDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));
var_dump ($bar);
var_dump ($baz);
?>
Expected result:
----------------
object(PDO)#1 (0) {
}
object(MyPDO)#2 (0) {
}
Actual result:
--------------
object(MyPDO)#1 (0) {
}
object(MyPDO)#2 (0) {
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47407&edit=1