Bug #81494 [Opn->Fbk]: Stopped unbuffered query does not throw error

From: Date: Fri, 01 Oct 2021 14:24:34 +0000
Subject: Bug #81494 [Opn->Fbk]: Stopped unbuffered query does not throw error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236965@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81494&edit=1 ID: 81494 Updated by: nikic@php.net Reported by: madri2 at gmail dot com Summary: Stopped unbuffered query does not throw error -Status: Open +Status: Feedback Type: Bug Package: MySQLi related Operating System: debian PHP Version: 7.4.24 Block user comment: N Private report: N New Comment: Please provide a full reproducer. Previous Comments: ------------------------------------------------------------------------ [2021-10-01 14:22:06] madri2 at gmail dot com Description: ------------ Do an unbuffered mysqli query and do a while to read all results, kill the mysql request in mysql, then php will only trigger a warning when doing fetch_assoc Warning: mysqli_result::fetch_assoc(): Error while reading a row while ($found = $req->fetch_assoc()) { } will only stop the loop when the mysql query is killed, instead of throwing an error I've tried to set mysqli_report(MYSQLI_REPORT_ALL & ~MYSQLI_REPORT_INDEX); but this doesn't change anything Expected result: ---------------- An exception thrown Actual result: -------------- Warning: mysqli_result::fetch_assoc(): Error while reading a row ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81494&edit=1

« previous php.bugs (#236965) next »