Bug 64104 - mysql_connect / mysql_close closes all links
mysql_connect / mysql_close closes all links
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Copeland
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-04-25 14:15 EDT by Need Real Name
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-25 17:43:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-04-25 14:15:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)

Description of problem:
With the 4.0.6-15 version of php, opening multiple non-persistent database 
links with mysql_connect (using the same username, password, and host), if you 
close a specific link with mysql_close, it closes ALL links to that database, 
not just the specific link you referenced.  Additional discussion about this 
problem, and its fix in php 4.2, which has been available since Monday are 
available at http://bugs.php.net/bug.php?id=16730.  

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.open a link to a database using mysql_connect
2.create a while loop that opens another link using mysql_connect, a database 
call, and then mysql connect
3. after the while loop exits, make a call to the original link reference.

Actual Results:  The main section of code will report that this "is not a valid 
MySQL-Link", since the inside loop closed both links.

Expected Results:  Like older versions of php, we would expect that the inside 
mysql_close would not kill ALL links to the database, even if they share 
username, password, and host.

Additional info:
Comment 1 Phil Copeland 2002-04-25 17:42:57 EDT
7.2 is 4.0.16-5 the bug referanced in php.net is for 4.1.2 but regardless it
seems that this is expected behaviour and is an upstream bug.
I'm contractually obliged to be working on another project until next thursday
at which time I'll revisit this bug.


Comment 2 Phil Copeland 2002-06-04 15:22:00 EDT
(Grumble, so the project overran by a couple of weeks..)
Ok, this has (I hope) been fixed in the upcoming errata
Basically I'm bundling in the 4.2.1 mysql extension into the errata.


Note You need to log in before you can comment on or make changes to this bug.