php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29002 mysqli query returns incorrect results
Submitted: 2004-07-03 20:57 UTC Modified: 2004-08-11 11:15 UTC
From: mark at nostromo dot net Assigned: georg (profile)
Status: Not a bug Package: MySQL related
PHP Version: 5.0.0RC3 OS: suse 9.1 AMD64
Private report: No CVE-ID: None
 [2004-07-03 20:57 UTC] mark at nostromo dot net
Description:
------------
I've duplicated this problem on 2 separate 64-bit opteron boxes.  Both are running Suse 9.1 64-bit.  I'm using apache 1.3.31, Mysql 4.1.3-beta, and PHP 5.0 RC3.

This may be a 64-bit related issue because the same query returns the correct results when PHP is compiled and run on 32-bit linux.

Also, if I use the normal mysql function calls, it returns the correct results on the opteron.  So it may be an issue with mysqli and 64-bit.  But that's only a guess.

Reproduce code:
---------------
$sql = "select config_id, config_name from config_name";
  
if ($stmt = $mysql->prepare($sql)) {
    $stmt->execute();
    $stmt->bind_result($id, $name);
      
    while ($stmt->fetch()) {
        echo "<tr>
                <td>$id</td>
                <td>$name</td>
              </tr>\n";
    }
      
    $stmt->close();
}

Expected result:
----------------
1 	suse-default
2 	laptop-default

Actual result:
--------------
32778017877000193  	suse-default
32778017877000194 	laptop-default

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-04 09:10 UTC] georg@php.net
 
 [2004-08-11 11:13 UTC] georg@php.net
Wasn't able to reproduce it on users machine (and also on MySQL AB internal AMD64 platform).
 [2004-08-11 11:15 UTC] georg@php.net
Wasn't able to reproduce it on users machine (and also on MySQL AB internal AMD64 platform).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC