From: mark at nostromo dot net
Operating system: suse 9.1 AMD64
PHP version: 5.0.0RC3
PHP Bug Type: MySQL related
Bug description: mysqli query returns incorrect results
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
--
Edit bug report at http://bugs.php.net/?id=29002&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29002&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29002&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29002&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29002&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29002&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29002&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29002&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29002&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29002&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29002&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29002&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29002&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29002&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29002&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29002&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29002&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29002&r=float