Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128867 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 1CEB21A00BC for ; Sun, 19 Oct 2025 19:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1760900799; bh=1zhfB+7IY6jzoozP1sU+JAD5L3+WTgWLZxHsgXynSIs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PG8oRQIH5zDR8VyXsa97x1O9NKPDXt6K7VNjNNvbht6GJr0sWpS6mUwhbGOfE6sFq M9YlJMzs8MQG+PRXaaP59fnvCyNsUyv31WmrWgXqkdeD1/R04H3R6SNrdz9JREYDda Bkm+McoZGtYpAm3EW7HFr2bJDR4gXKz3dDNgD9MBGETFcfZHvNwuBMXY2srWZxHhl0 OAfUmvAQ7eeZTO93VauwpkKneia6YO/u8xpxPpwZQ4AaIXZJlh54vCDYABDRT8lXGL iRKbiHgLgmqG95zfRa5fcJznZwTHxHX8JOn4nSPvtdsR+ppPmwe+J+ZlFnBje7Eakq 46OZ7dzl9gddg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 473BA18002E for ; Sun, 19 Oct 2025 19:06:35 +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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Sun, 19 Oct 2025 19:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1760900788; bh=N/tsiQ9nlPUWjuWpAk2/uREetnQexdr23jfarrqkGPg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=DjtkP3ThP6D0S9SdrgkbiIzAU6GqR1f17Pvhsz9KNx88o1dvcwnFnCr0goIBbKota 4/5RtHfc/Z14UTsmaqZKQK+qEyr4VjdnjbeAaxObJaeQaGQWHMuUvQOUdsaoGEsa3Z /zFfbGDkhGzBi40ACHO78IOYKYmax9ouqaLQOwLRQjZl0YYely53qhJp2wPGcc2gMF lKia9d4Yu28NUBGIWUVHQSYIPOg5T7YGGz5vLyEpwM/jmfapwWdbNOUyPBY+YNI3sW W70or+vnzFb4WhpmE539XuPb/XC5UAayeIBIz1XcU3lbmCMeKt3JWlY6tF2XzCknFo 6bUNHGwV/jOSQ== Message-ID: <3d5daf7d-450c-43c6-ab4f-c886863894a1@bastelstu.be> Date: Sun, 19 Oct 2025 21:06:25 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [Discuss] Add PDO disconnect() and isConnected() To: AllenJB , 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: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 10/1/25 16:45, AllenJB wrote: > As I understand it, at least in the case of MySQL, the state of > persistent connections is not managed by MySQL, but by the client (PHP). > This means that it's (at least theoretically) possible for a connection > to end up in an undesirable state, in which case there should be a way > to close it so it's not reused. I have filed https://github.com/php/php-src/issues/20225. I am not sufficiently knowledgeable about PDO, MySQLnd and MySQL itself to implement it myself, but it should not be particularly hard and I think it would greatly improve safety of using persistent connections with MySQL. Best regards Tim Düsterhus