Bug 64104 - mysql_connect / mysql_close closes all links
Summary: mysql_connect / mysql_close closes all links
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php   
(Show other bugs)
Version: 7.2
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-04-25 18:15 UTC by Need Real Name
Modified: 2007-04-18 16:42 UTC (History)
0 users

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

Attachments (Terms of Use)

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:

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
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 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.


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