Re: Same mysql link when calling mysql_connect a second time with same arguments
| From: | Zeev Suraski | Date: | Fri, 13 Apr 2001 20:56:20 +0000 |
| Subject: | Re: Same mysql link when calling mysql_connect a second time with same arguments | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-51558@lists.php.net to get a copy of this message | ||
It should be completely transparent (well, provided you're not using the new in-CVS feature of unbuffered queries). With no drawbacks, and a fair advantage, it's a better way to go than establish a new link.
The current implementation suffers from a limitation, in which closing one of the links will invalidate all of the handles that point to that link. It's a bug, though, and I intend to fix it for 4.0.6.
Zeev
At 15:32 13/4/2001, Markus Fischer wrote:
On Thu, Apr 12, 2001 at 11:23:15PM +0200, Markus Fischer wrote : Would it be an option to extend mysql_(p)connect to return new links instead of allready created one with a new, optional parameter ? Like : int mysql_connect ([string hostname [:port] [:/path/to/socket] [,-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/string username [, string password [, boolean new_link]]]])I just wanted to add that this behaviour may apply toother databases, I dont know, but I verified it with current oracle implementation and it does not behave the same as mysql does. A new link identifier is created with every call to OCILogon wether the arguments are the same or not. The oci8 extension does not use a cache of established links which is the right thing IMHO. Or, yes you could definitly add caching established links here too (if its programmatically possible ...) but should have the option whether to do so or not. someone sharing my ideas ? ty,Markus-- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/EMail: mfischer@josefine.ben.tuwien.ac.atPGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net