[php-src] PR #25109: Fix GH-25106: Clear stale PDO SQLite prefetch

From: Date: Sat, 31 Oct 2026 18:44:38 +0000
Subject: [php-src] PR #25109: Fix GH-25106: Clear stale PDO SQLite prefetch
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40155@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25109 Author: JoaoMarcos44 Fixes #25106. > AI-assisted contribution. The patch, regression test, and explanation were prepared with AI > assistance and checked with local builds and tests. ## Summary > Reset the prefetched-row flag when the PDO SQLite cursor is closed. Previously, an unread row > could survive cursor reset and make a later empty execution return a phantom row of null values. > The PHPT covers fresh, unread, explicitly closed, and consumed statements, including a later > nonempty execution. A NEWS entry records the fix. ## Validation > Target: PHP-8.4, the lowest actively supported affected branch. > Built with --enable-debug --enable-zts. > - The new regression fails before the fix and passes afterward. > - make -j1 passes. > - make -j1 test TESTS=ext/pdo_sqlite/tests passes with 171 > passed, 9 skipped, and 1 existing expected failure. No unexpected failures or warnings. The test > runner uses one worker. > - The full PHP suite and Windows builds were not run. <details> <summary>Illustrated explanation</summary> > AI-generated conceptual illustration. The issue contains the executable reproduction. ![PDO SQLite cursor reset](https://raw.githubusercontent.com/JoaoMarcos44/php-src/9e60fedb55c1c3bdfaeb339f1beeae2895526596/assets/pdo/infographic.png) [Explanation and prompt](https://github.com/JoaoMarcos44/php-src/blob/9e60fedb55c1c3bdfaeb339f1beeae2895526596/assets/pdo/infographic_report.md) </details>

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