Bug #51300 [NEW]: SELECT * CRASH With LibMySQL > 5.0.51
| From: | tanguy dot pruvot at gmail dot com | Date: | Mon, 15 Mar 2010 03:06:47 +0000 |
| Subject: | Bug #51300 [NEW]: SELECT * CRASH With LibMySQL > 5.0.51 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-148621@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows 7
PHP version: 5.2.13
Package: PDO related
Bug Type: Bug
Bug description:SELECT * CRASH With LibMySQL > 5.0.51
Description:
------------
Since LibMySQL.dll 5.0.52 (and tested to 5.1.44)
I ve the found why pdo_mysql is crashing...
Here :
http://github.com/php/php-
src/blob/4f3e41e55dae1978487461d73805eaac8202aff8/ext/pdo_mysql/mysql_statement.
c#L429
The struct pdo_column_data must be 0x54 (84.) bytes sized... Actually it is
0x50
(80.) bytes
You can fix binary dll by replacing (with hex editor : 83 C3 50 by 83 C3
54)
Test script:
---------------
<?php
$dbh = new
PDO('mysql:host=127.0.0.1;port=3306;dbname=ubagestion_dev','root','');
echo "ok";
$dbh->exec('SET CHARACTER SET latin1');
echo "ok";
$stmt = $dbh->query("select ID_Utilisateur from utilisateurs");
echo "ok";
$stmt = $dbh->prepare("select * from utilisateurs");
echo "ok";
$results = $stmt->execute(); // CRASH HERE or on $dbh->query("SELECT * FROM
...")
echo "NOT CRASHED";
foreach ($results as $id){
echo $results['ID_Utilisateur'];
}
Actual result:
--------------
no trace, system crash (and apache too if apache2handler used)
Crash on second column name
--
Edit bug report at http://bugs.php.net/bug.php?id=51300&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51300&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51300&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51300&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51300&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51300&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51300&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51300&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51300&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51300&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51300&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51300&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51300&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51300&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51300&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51300&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51300&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51300&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51300&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51300&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51300&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51300&r=mysqlcfg