From:             sh4dow at php dot pl
Operating system: Win2000
PHP version:      5.0.1
PHP Bug Type:     MySQL related
Bug description:  php losts one of two mysql links

Description:
------------
when i try to make 2 difrent connection to the mysql, php lost one of
them, and all query are making by only one connection. Where is the second
?

Reproduce code:
---------------
$link1 = mysql_connect('localhost', 'user1', '***') or
die(mysql_error());
mysql_select_db('baza1', $link1) or die(mysql_error());
$link2 = mysql_connect('localhost', 'user2', '***') or
die(mysql_error());
mysql_select_db('baza2', $link2) or die(mysql_error());

$query1 = mysql_query("SELECT * from users LIMIT 0,1", $link1);
while ($r1 = mysql_fetch_assoc($query1)){
    var_dump($r1);
}

$query2 = mysql_query("SELECT * from users LIMIT 0,1", $link2);
while ($r2 = mysql_fetch_assoc($query2)){
    var_dump($r2);
}

Expected result:
----------------
should be two difrent results

Actual result:
--------------
only one result, the second give an error or null

-- 
Edit bug report at http://bugs.php.net/?id=30137&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30137&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30137&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30137&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30137&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30137&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30137&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30137&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30137&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30137&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30137&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30137&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30137&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30137&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30137&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30137&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30137&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30137&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30137&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30137&r=mysqlcfg

Reply via email to