php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41159 mysql_pconnect() to check flags param, too
Submitted: 2007-04-22 04:09 UTC Modified: 2007-04-22 15:19 UTC
From: zizka at seznam dot cz Assigned:
Status: Closed Package: MySQL related
PHP Version: 5.2.1 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zizka at seznam dot cz
New email:
PHP Version: OS:

 

 [2007-04-22 04:09 UTC] zizka at seznam dot cz
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-22 15:19 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC