Bug 64104

Summary: mysql_connect / mysql_close closes all links
Product: [Retired] Red Hat Linux Reporter: Need Real Name <jason>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-25 21:43:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-04-25 18:15:15 UTC
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:
Always

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 21:42:57 UTC
Huh?
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.

Cheers

Phil
=--=

Comment 2 Phil Copeland 2002-06-04 19:22:00 UTC
(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.

Phil
=--=