Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records
Edit report at http://bugs.php.net/bug.php?id=52090edit=1 ID: 52090 Updated by: fel...@php.net Reported by:gsx1022 at gmail dot com Summary:mysql_fetch_assoc returns infinite number of records Status: Feedback Type: Bug Package:MySQL related Operating System: Linux x86 PHP Version:5.3.2 Block user comment: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2010-07-06 20:12:30] gsx1022 at gmail dot com I am sorry, I was not clear enough. I wanted to say, that it will take some time for me to set up a test box, but wanted to share my other findings earlier. I do know that you are volunteers, and that others have work to do too. [2010-07-06 19:02:37] johan...@php.net As reference, here the output I get: array(3) { [name]= string(4) root [level]= string(1) 0 [parent]= NULL } br /br /array(3) { [name]= string(5) error [level]= string(1) 1 [parent]= string(4) root } br /br /array(3) { [name]= string(11) index_index [level]= string(1) 1 [parent]= string(4) root } br /br /array(3) { [name]= string(11) error_error [level]= string(1) 2 [parent]= string(5) error } br /br /array(3) { [name]= string(12) error_denied [level]= string(1) 2 [parent]= string(5) error } br /br / [2010-07-06 19:01:55] johan...@php.net Just let me get this straight: You have an issue and now you ask us to invest our (limited) time (for free) to rebuild your setup and find the causing component? - As you can imagine we all have our tasks to do and our deadlines and for some work on PHP is hobby, too. With your given your schema I was unable to reproduce this case on any of my setups. [2010-07-06 17:16:42] gsx1022 at gmail dot com No, I meant that I cannot afford the time loss since the deadline for my work is *really* close, and this is just hobby project. :-P [2010-07-06 16:51:30] ras...@php.net Can't afford? As in financially? There are multiple free virtualization mechanisms out there and the OS images are free. Setting up a clean vm on your existing machine is trivial and takes about 30 minutes, tops. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52090 -- Edit this bug report at http://bugs.php.net/bug.php?id=52090edit=1
Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records
Edit report at http://bugs.php.net/bug.php?id=52090edit=1 ID: 52090 Updated by: ras...@php.net Reported by: gsx1022 at gmail dot com Summary: mysql_fetch_assoc returns infinite number of records Status: Feedback Type: Bug Package: MySQL related Operating System: Linux x86 PHP Version: 5.3.2 New Comment: Can't afford? As in financially? There are multiple free virtualization mechanisms out there and the OS images are free. Setting up a clean vm on your existing machine is trivial and takes about 30 minutes, tops. Previous Comments: [2010-07-06 16:20:28] gsx1022 at gmail dot com In my current situation I cannot afford to set up a test box and try to compile the snapshot from php.net. However, I will do so as soon as I can. In the meantime here is the source-archive with all patches that I use, from the Ubuntu Repositories: http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz Also, I can confirm that the same problem exists on an x64 box with the same software versions too. All other requested information (schema, versions) are provided in detail on the link in the description. [2010-06-23 01:44:41] johan...@php.net Please use a recent snapshot from our site, we don't know what kind of patches Ubuntu applies. Please provide the table schema and data you are querying. Whcih MySQL server version? [2010-06-16 13:19:23] gsx1022 at gmail dot com I am using the php5 package from the Ubuntu Linux APT repository. It seems to use libmysql. And yes, mysqli is also affected. [2010-06-16 03:51:33] ka...@php.net Do you use mysqlnd with ext/mysql or libmysql, in either case does it solve switching the lib? Is mysqli affected by this issue too on your machine? [2010-06-15 21:35:55] gsx1022 at gmail dot com 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 this bug report at http://bugs.php.net/bug.php?id=52090edit=1
Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records
Edit report at http://bugs.php.net/bug.php?id=52090edit=1 ID: 52090 Updated by: johan...@php.net Reported by: gsx1022 at gmail dot com Summary: mysql_fetch_assoc returns infinite number of records Status: Feedback Type: Bug Package: MySQL related Operating System: Linux x86 PHP Version: 5.3.2 New Comment: Just let me get this straight: You have an issue and now you ask us to invest our (limited) time (for free) to rebuild your setup and find the causing component? - As you can imagine we all have our tasks to do and our deadlines and for some work on PHP is hobby, too. With your given your schema I was unable to reproduce this case on any of my setups. Previous Comments: [2010-07-06 17:16:42] gsx1022 at gmail dot com No, I meant that I cannot afford the time loss since the deadline for my work is *really* close, and this is just hobby project. :-P [2010-07-06 16:51:30] ras...@php.net Can't afford? As in financially? There are multiple free virtualization mechanisms out there and the OS images are free. Setting up a clean vm on your existing machine is trivial and takes about 30 minutes, tops. [2010-07-06 16:20:28] gsx1022 at gmail dot com In my current situation I cannot afford to set up a test box and try to compile the snapshot from php.net. However, I will do so as soon as I can. In the meantime here is the source-archive with all patches that I use, from the Ubuntu Repositories: http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz Also, I can confirm that the same problem exists on an x64 box with the same software versions too. All other requested information (schema, versions) are provided in detail on the link in the description. [2010-06-23 01:44:41] johan...@php.net Please use a recent snapshot from our site, we don't know what kind of patches Ubuntu applies. Please provide the table schema and data you are querying. Whcih MySQL server version? [2010-06-16 13:19:23] gsx1022 at gmail dot com I am using the php5 package from the Ubuntu Linux APT repository. It seems to use libmysql. And yes, mysqli is also affected. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52090 -- Edit this bug report at http://bugs.php.net/bug.php?id=52090edit=1
Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records
Edit report at http://bugs.php.net/bug.php?id=52090edit=1 ID: 52090 Updated by: johan...@php.net Reported by: gsx1022 at gmail dot com Summary: mysql_fetch_assoc returns infinite number of records Status: Feedback Type: Bug Package: MySQL related Operating System: Linux x86 PHP Version: 5.3.2 New Comment: As reference, here the output I get: array(3) { [name]= string(4) root [level]= string(1) 0 [parent]= NULL } br /br /array(3) { [name]= string(5) error [level]= string(1) 1 [parent]= string(4) root } br /br /array(3) { [name]= string(11) index_index [level]= string(1) 1 [parent]= string(4) root } br /br /array(3) { [name]= string(11) error_error [level]= string(1) 2 [parent]= string(5) error } br /br /array(3) { [name]= string(12) error_denied [level]= string(1) 2 [parent]= string(5) error } br /br / Previous Comments: [2010-07-06 19:01:55] johan...@php.net Just let me get this straight: You have an issue and now you ask us to invest our (limited) time (for free) to rebuild your setup and find the causing component? - As you can imagine we all have our tasks to do and our deadlines and for some work on PHP is hobby, too. With your given your schema I was unable to reproduce this case on any of my setups. [2010-07-06 17:16:42] gsx1022 at gmail dot com No, I meant that I cannot afford the time loss since the deadline for my work is *really* close, and this is just hobby project. :-P [2010-07-06 16:51:30] ras...@php.net Can't afford? As in financially? There are multiple free virtualization mechanisms out there and the OS images are free. Setting up a clean vm on your existing machine is trivial and takes about 30 minutes, tops. [2010-07-06 16:20:28] gsx1022 at gmail dot com In my current situation I cannot afford to set up a test box and try to compile the snapshot from php.net. However, I will do so as soon as I can. In the meantime here is the source-archive with all patches that I use, from the Ubuntu Repositories: http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5_5.3.2.orig.tar.gz Also, I can confirm that the same problem exists on an x64 box with the same software versions too. All other requested information (schema, versions) are provided in detail on the link in the description. [2010-06-23 01:44:41] johan...@php.net Please use a recent snapshot from our site, we don't know what kind of patches Ubuntu applies. Please provide the table schema and data you are querying. Whcih MySQL server version? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52090 -- Edit this bug report at http://bugs.php.net/bug.php?id=52090edit=1
Bug #52090 [Fbk]: mysql_fetch_assoc returns infinite number of records
Edit report at http://bugs.php.net/bug.php?id=52090edit=1 ID: 52090 Updated by: johan...@php.net Reported by: gsx1022 at gmail dot com Summary: mysql_fetch_assoc returns infinite number of records Status: Feedback Type: Bug Package: MySQL related Operating System: Linux x86 PHP Version: 5.3.2 New Comment: Please use a recent snapshot from our site, we don't know what kind of patches Ubuntu applies. Please provide the table schema and data you are querying. Whcih MySQL server version? Previous Comments: [2010-06-16 13:19:23] gsx1022 at gmail dot com I am using the php5 package from the Ubuntu Linux APT repository. It seems to use libmysql. And yes, mysqli is also affected. [2010-06-16 03:51:33] ka...@php.net Do you use mysqlnd with ext/mysql or libmysql, in either case does it solve switching the lib? Is mysqli affected by this issue too on your machine? [2010-06-15 21:35:55] gsx1022 at gmail dot com 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 this bug report at http://bugs.php.net/bug.php?id=52090edit=1