Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128774 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id D12401A00BC for ; Sat, 4 Oct 2025 16:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1759595587; bh=1v0RhOxaJQuX2Uxt3lt0QSKUkILSRiztwovKwjgOxWo=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=eOTYxRAm/OOELIdDORBGmSwQQzzFFnDFGwMREU4aTi/Vpl2nLCdRGyMIKgDAWfZfu DWRV7I8GeYrljf5dAogII6pgJ7I0KZUV7uiHvrrIhjqjw/UkEkLGn/Ir19dAVzRmcA /iwOcHEAMoHPyYrvrQafjyCHZhPgyFpBPYtcLoiSmZSnIrNPnTGMz+fPlnrw7AXAlP JEUwiyzs8Pih6NDh0xFTcxPYjyV6y0eXgIMfC23ZLHbbSXpv7rwcf1tvg9VH6iGbnF o0CQttyPLogW3igyjK6sZsaeoQjqHuu3n+iRuMcEEWfI183AYmCPxteVBsGuvq3BNb TlnqrgR1CIp0w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C09ED18006D for ; Sat, 4 Oct 2025 16:33:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 4 Oct 2025 16:32:55 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 17B307A00A4; Sat, 4 Oct 2025 12:34:13 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sat, 04 Oct 2025 12:34:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=allenjb.me.uk; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1759595652; x=1759682052; bh=STqx4d2VbgHGcZ045v0+SG+xYPsRtfcR DpK4RePVzdM=; b=WPMQgiVuKv6NN0YFpgpmdIljeEto5bPAfz6zS7sPS/M1QYfS Y7N/kmytKU/z7kWjsBBGeqmHHho5dnjje+7X/0PRZ9dbxJ7/++PK8u5Uh2CHO8v5 44iLbyVDMPDyQFPJOcu7sXvviAM+T6ZOn0thoSHdN2TLCmAGn2ND7jmn/r/VIz24 Q+dNhiDmr4xlS4WBjn7LrFzyTSJ4+cG7l6yVlgfnN/lKTvU/wHNZfjKHiawmC/Ya X1/LlTQbgJ5u5BTkETwfDFu+cPPjyVR7Sng3LAa6JcJR/XaIVCymGiIVitIPPAC7 i/GA72X7lrqCdZJiyhh9eXMlzuv8CCJlIpkaBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1759595652; x= 1759682052; bh=STqx4d2VbgHGcZ045v0+SG+xYPsRtfcRDpK4RePVzdM=; b=w M9EiSg32htQX71srbZhXXTyZo0ge8X51YMhLjp3jhtTbohm2d5ZAc8WLMYeuXIY3 wvJ3hvMcpeGULoJLLNGKKX5TqODUPRSw/zwI3RXLrZkGhqyqyR+isS8XeS4kjdro yz7Gr2KO8+VdvwKrEswyTIyMmCccc5l74vnA4f+4zJNhtXfzZGvSRi0SBEzVxhCp 557odEeqFvAX588zGjo17t4WT+rp5J8bhZ35QkLhczcRakRnusc20FMrPgmdiRCN n+KZ1nVIQKsp2zx+hANPhtYVOJbrgPQWm58yVrtwRLqBOUWFl5I/KlGv/4Q1hVzE WTGJr9mx9ohcDPoNKFT2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdelvddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuhffvvehfjggtgfesthejredttddvjeenucfhrhhomheptehllhgvnhfl uecuoehphhhprdhlihhsthhssegrlhhlvghnjhgsrdhmvgdruhhkqeenucggtffrrghtth gvrhhnpeekgeetueekkeejffffteefuefgtdfgjedtgfeiteduudevhefhffehhedttdef ueenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphhhphdrlhhishhtshesrghllhgvnhhjsgdr mhgvrdhukhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepthgvkhhivghlrgdvgeeisehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhpohhs khihsehgmhgrihhlrdgtohhmpdhrtghpthhtoheptghlrghuuggvrdhprggthhgvsehgmh grihhlrdgtohhmpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdr nhgvth X-ME-Proxy: Feedback-ID: idf69468d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 4 Oct 2025 12:34:11 -0400 (EDT) Message-ID: Date: Sat, 4 Oct 2025 17:34:11 +0100 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [Discuss] Add PDO disconnect() and isConnected() To: Kamil Tekiela , Robert Wolf Cc: Claude Pache , PHP internals References: <7b1f853f-1bb0-4d84-975b-164a71e092cc@allenjb.me.uk> Content-Language: en-US In-Reply-To: <7b1f853f-1bb0-4d84-975b-164a71e092cc@allenjb.me.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: php.lists@allenjb.me.uk (AllenJB) On 01/10/2025 15:45, AllenJB wrote: > As an aside, the manual is unclear on how much management of > persistent connections PDO does. I have an open issue on this: > https://github.com/php/doc-en/issues/4540 > > (I did have a brief look again and based on some further investigation > I did based (initially) on the answer thecotne gave in the above > linked issue, believe that answer may not be accurate, at least in its > reasoning, and thus their conclusion is circumspect. Looking at this > again is somewhere on my todo list, I think) An update: Based on testing, PDO (MySQL) does not perform cleanup of state of persistent connections - this means transactions, temporary tables, locks and other stateful changes may remain, causing the connection to be in an unexpected state. For details of my test see https://github.com/php/doc-en/issues/4540#issuecomment-3368381887 In my opinion, this makes a method of forcing a (persistent) connection closed explicitly useful.