From: Operating system: Linux x86 PHP version: 5.3.2 Package: MySQL related Bug Type: Bug Bug description:mysql_fetch_assoc returns infinite number of records
Description: ------------ A MySQL query that should return 5 records returns an infinite number of records. It returns the 5 five records correctly, but then it returns them again, and again, and again... Other SELECT statements are fine, this is the only problematic one. Also, this query works from the MySQL console just fine. At first I thought it is an issue with Zend Framework but it turned out it is probably not. See this url for (much) more info (also detailed information to reproduce): http://framework.zend.com/issues/browse/ZF-9982 Test script: --------------- $c = mysql_connect('host', 'user', 'pass'); mysql_select_db('db', $c); $raw = mysql_query('SELECT `name`, `level`, `parent` FROM `allresources_view` ORDER BY `level` ASC'); while ($r = mysql_fetch_assoc($raw)) { var_dump($r); echo '<br /><br />'; } mysql_close($c); Expected result: ---------------- 5 records should have been returned from the database. Actual result: -------------- An infinite number of records are returned from the database. -- Edit bug report at http://bugs.php.net/bug.php?id=52090&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52090&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52090&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52090&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52090&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52090&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52090&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52090&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52090&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52090&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52090&r=support Expected behavior: http://bugs.php.net/fix.php?id=52090&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52090&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52090&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52090&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52090&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52090&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52090&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52090&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52090&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52090&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52090&r=mysqlcfg