From:             zizka at seznam dot cz
Operating system: All
PHP version:      5.2.1
PHP Bug Type:     MySQL related
Bug description:  mysql_pconnect() to check flags param, too

Description:
------------
mysql_pconnect() tries to reuse an exisiting connection with 
the same host/port/username/password from connection pool.

This causes PHP programmers wonder why their application do not behave as
they should after changing the flags in their code (like here:
   http://bugs.php.net/bug.php?id=29763
). The actual solution is to restart PHP's container or MySQL or KILL the
PHP's threads in MySQL - all of it sometimes unavailable (commercial
hosting).

So I believe mysql_pconnect() should check flags parameter, too.

Reproduce code:
---------------
$resA = mysql_pconnect('localhost','test','test');
$resB = mysql_pconnect('localhost','test','test', 131072);

echo "A: $resA   B: $resB";

Expected result:
----------------
Different connections.

Actual result:
--------------
Same pooled connection.

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

Reply via email to