php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34332 PDO returns corrupted data
Submitted: 2005-09-01 19:09 UTC Modified: 2005-09-01 21:07 UTC
From: mike at blueroot dot co dot uk Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.0RC1 OS: Linux 2.6
Private report: No CVE-ID: None
 [2005-09-01 19:09 UTC] mike at blueroot dot co dot uk
Description:
------------
PDO is corrupting data returned from the database.

Numbers such as 15215 are returned as 1521[random character]

eg. 11511 is returned as 1151

This bug doesnt seem to be present in php-5.1.0b2 (php-5.1.0b3 has a mktime bug), but it is in RC1

Reproduce code:
---------------
$sql = "SELECT id FROM table WHERE other_id = 3";
$rs = $db->query($sql);
$result = $rs->fetchAll(PDO_FETCH_ASSOC);

print_r($result);



Expected result:
----------------
Array
(
    [id] => 11511
)



Actual result:
--------------
Array
(
    [id] => 1151
)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-01 19:14 UTC] mike at blueroot dot co dot uk
I have tried this as both mod_php under Apache and FastCGI under Litespeed.
 [2005-09-01 19:35 UTC] wez@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Which driver are you using?
 [2005-09-01 19:36 UTC] mike at blueroot dot co dot uk
Sorry, its pdo-mysql
 [2005-09-01 21:07 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 22:01:27 2024 UTC