Bug #81494 [NEW]: Stopped unbuffered query does not throw error
| From: | madri2 at gmail dot com | Date: | Fri, 01 Oct 2021 14:22:06 +0000 |
| Subject: | Bug #81494 [NEW]: Stopped unbuffered query does not throw error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-236964@lists.php.net to get a copy of this message | ||
From: madri2 at gmail dot com
Operating system: debian
PHP version: 7.4.24
Package: MySQLi related
Bug Type: Bug
Bug description:Stopped unbuffered query does not throw error
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 bug report at https://bugs.php.net/bug.php?id=81494&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81494&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81494&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81494&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81494&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81494&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81494&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81494&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81494&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81494&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81494&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81494&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81494&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81494&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81494&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81494&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81494&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81494&r=mysqlcfg