Bug #66525 [NEW]: Mysqli::thread_id limited in 32bit int.
| From: | aleiphoenix at gmail dot com | Date: | Tue, 21 Jan 2014 03:08:58 +0000 |
| Subject: | Bug #66525 [NEW]: Mysqli::thread_id limited in 32bit int. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183925@lists.php.net to get a copy of this message | ||
From: aleiphoenix at gmail dot com
Operating system: Linux x86_64
PHP version: 5.5.8
Package: MySQLi related
Bug Type: Bug
Bug description:Mysqli::thread_id limited in 32bit int.
Description:
------------
When MySQL connection_id goes larger then 2**31, Mysqli::thread_id just
return the wrong value.
tested version
PHP 5.5.7 on Gentoo Linux x86_64
PHP 5.2.14 on RHEL 5.5 x86_64
Test script:
---------------
<?php
$mysql = new Mysqli('127.0.0.1', 'batchjob', 'aN2jU3ke',
'anjuke_db');
$_id = $mysql->thread_id;
var_dump($_id);
$sql = 'select connection_id()';
$res = $mysql->query($sql);
var_dump($res->fetch_row()[0]);
sleep(30);
$mysql->close();
Expected result:
----------------
result of Mysqli::thread_id is the same as result of `select
connection_id()` statement.
Actual result:
--------------
Mysqli::thread_id: 2804557258
select connection_id(): 11394491850
--
Edit bug report at https://bugs.php.net/bug.php?id=66525&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66525&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66525&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66525&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66525&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66525&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66525&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66525&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66525&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66525&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66525&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66525&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66525&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66525&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66525&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66525&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66525&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66525&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66525&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66525&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66525&r=mysqlcfg