|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-06-08 04:26 UTC] rgagnon24 at gmail dot com
[2014-01-01 12:36 UTC] felipe@php.net
-Package: PDO related
+Package: PDO Core
[2016-04-06 21:44 UTC] doug at opendns dot com
[2016-07-01 09:56 UTC] cmb@php.net
[2016-07-01 14:35 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2016-07-01 14:35 UTC] cmb@php.net
[2017-10-24 08:29 UTC] kalle@php.net
-Package: PDO Core
+Package: PDO related
[2020-12-11 15:40 UTC] nikic@php.net
-Status: Verified
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2020-12-11 15:40 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ If PDO errors on it's LAST query it will refuse to disconnect from the database until the end of the script. Test script: --------------- <?php $get_new_pdo = function() { return new PDO( ... ); }; $pdo1 = $get_new_pdo(); $pdo2 = $get_new_pdo(); $base_line = count( $pdo1->query( "SHOW PROCESSLIST;" )->fetchAll() ); $pdo2->query( "SELECT column FROM non_existent_table;" ); //$pdo2->query( "SELECT 1;" ); //uncommenting this line causes $pdo2 to be released correctly $pdo2 = NULL; $after_unset = count( $pdo1->query( "SHOW PROCESSLIST;" )->fetchAll() ); var_dump( $base_line - $after_unset ); ?> Expected result: ---------------- int(1) Actual result: -------------- int(0)