ID: 47928 Updated by: [email protected] Reported By: jjuergens at web dot de Status: Verified Bug Type: MySQLi related Operating System: * PHP Version: 5.2CVS-2009-04-19 New Comment:
Here's better reproduce data (the longtext column has to have enough data to cause crash): drop database crashtest; create database crashtest; use crashtest; create table crash ( test longtext ); insert into crash set test=' 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 '; grant select on crashtest.* to 'test'@'localhost'; Previous Comments: ------------------------------------------------------------------------ [2009-04-19 14:44:29] jjuergens at web dot de Yeah, you're right: Soon as I change the column-type from longtext to text, PHP doesn't crash anymore. The example you provided also crashes on my debug-enabled PHP-Version, while the Opensuse-Version (with Suoshin-Patch) throws efree()-errors until there are more than 396 characters in the textfield. I actually tried to debug the PHP-code some (with very limited knowledge) and I think that the problem is somewhere within the binding of the resultset since thats where the script stops. ------------------------------------------------------------------------ [2009-04-19 14:28:19] wcshields at gmail dot com I just noticed the status of #46808 is marked as "Bogus". Unfortunately there's no history to see who marked it that way or why but I guess that explains why no action was taken on it. This issue has been reported in various forms for over two years now. The fact that such reports were written off essentially as hoaxes or pranks or just plain incompetence by everyone else speaks volumes about the lack of professionalism and due diligence by whoever is responsible for investigating such bugs. So Allelujah that someone finally bothered--years later--to actually fix it. Maybe if the PHP devs took such reports more seriously, packages like mysqli wouldn't be the horrible buggy messes that they are. ------------------------------------------------------------------------ [2009-04-19 14:11:14] [email protected] See also bug #46808 ------------------------------------------------------------------------ [2009-04-19 14:07:02] [email protected] Here is the shortest possible test I could come up with: <?php /* Test database and table with data: drop database crashtest; create database crashtest; use crashtest; create table crash ( test longtext ); insert into crash set test='123456789'; grant select on crashtest.* to 'test'@'localhost'; */ $dbLink=new mysqli("localhost","test","","crashtest",3306); $stmt=$dbLink->prepare("SELECT test FROM crash"); $stmt->execute(); $stmt->bind_result($foo); while($stmt->fetch()); $stmt->close(); ?> The problem seems to be with the longtext column. If that is changed to text column, everything works just fine. ------------------------------------------------------------------------ [2009-04-19 10:59:40] [email protected] Above example causes crash also on my test server. (I removed other irrelevant comments) ------------------------------------------------------------------------ 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/47928 -- Edit this bug report at http://bugs.php.net/?id=47928&edit=1
