[php-src] PR #23065: ext/pdo_pgsql: Drain the connection when a lazy fetch ends

From: Date: Wed, 05 Aug 2026 12:26:17 +0000
Subject: [php-src] PR #23065: ext/pdo_pgsql: Drain the connection when a lazy fetch ends
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-37553@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23065 Author: KentarouTakeda With the lazy fetch added in 8.5 (PDO::ATTR_PREFETCH => 0), the next lazy fetch on the same connection can fail with SQLSTATE[HY000]: another command is already in progress, whether the previous one was read to the end or discarded halfway. It only happens with ATTR_EMULATE_PREPARES or ATTR_DISABLE_PREPARES. Both endings go through the same cleanup, which reads the rest of the result set only while the statement is flagged as streaming. Both cleared that flag first, so the cleanup did nothing. With a prepared statement, closing it afterwards clears the state. Remove the two assignments and let the cleanup clear the flag once it has read the rest.

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