#34324 [NEW]: mysql_select_db not honoring connection ids
| From: | ehassler at gmail dot com | Date: | Thu, 01 Sep 2005 08:37:41 +0000 |
| Subject: | #34324 [NEW]: mysql_select_db not honoring connection ids | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84277@lists.php.net to get a copy of this message | ||
From: ehassler at gmail dot com
Operating system: Windows 2000
PHP version: 5.0.4
PHP Bug Type: MySQL related
Bug description: mysql_select_db not honoring connection ids
Description:
------------
When maintaining two connections to the same mysql server mysql_select_db
requests with the connection id supplied are setting both connections to
use that database.
Reproduce code:
---------------
$silver = mysql_connect('localhost','user','pass', true);
mysql_select_db('silver',$silver);
$lemon = mysql_connect('localhost','user','pass', true);
mysql_select_db('lemon',$lemon);
$silver_result = mysql_query('select * from errors') or print("The query
has become invalid: \"".mysql_errno().": ".mysql_error()."\"");
var_dump($silver);
var_dump($lemon);
Expected result:
----------------
query should execute on silver.errors
Actual result:
--------------
I get an error that lemon.errors does not exist, even though both $silver
and $lemon have different connection ids...
--
Edit bug report at http://bugs.php.net/?id=34324&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34324&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34324&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34324&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34324&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34324&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34324&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34324&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34324&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34324&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34324&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34324&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34324&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34324&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34324&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34324&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34324&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34324&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34324&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34324&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34324&r=mysqlcfg