[php-src] PR #23963: Fix GH-23962: Don't roll back a persistent PDO handle still in use

From: Date: Mon, 28 Sep 2026 11:17:26 +0000
Subject: [php-src] PR #23963: Fix GH-23962: Don't roll back a persistent PDO handle still in use
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38878@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23963 Author: lazerg pdo_dbh_free_storage() rolled back an open transaction whenever a PDO object was freed, before dbh_free() had a chance to see that the persistent handle was still shared. So unsetting one of two persistent instances with the same DSN rolled back the transaction the other one had just started. The rollback now only runs for a persistent handle when no other object holds it, i.e. refcount is at most 2 (the persistent list keeps one reference). Freeing the last object still rolls back, so an open transaction doesn't leak into the next request. Fixes GH-23962

« previous php.git-pulls (#38878) next »