ID: 39457 Updated by: [EMAIL PROTECTED] Reported By: josh at mykoala dot com -Status: Assigned +Status: Closed Bug Type: MySQLi related Operating System: OS X 10.4.8 PHP Version: 5.2.0 Assigned To: andrey New Comment:
The fix will appear in 5.3.0 Previous Comments: ------------------------------------------------------------------------ [2008-01-12 15:32:37] [EMAIL PROTECTED] This is actually a MySQL C API problem, too. mysql_real_connect() (the C API function that mysqli::real_connect() is built upon) does allow a 2nd connect on an already connected MYSQL structure, too, and the result is that a 2nd connection to the server is opened and the previous connection enters a "zombie" state ... Now filed as MySQL bug: http://bugs.mysql.com/33831 ------------------------------------------------------------------------ [2007-10-23 08:29:51] [EMAIL PROTECTED] It looks like a partial fix was added 6th of September for mysqli_connect, nothing for real_connect because calling mysql_close() destroys the mysql struct allocated by mysqli_init() so any values you had set would be lost. This could potentially cause problems if say you disabled auto_commit or similar. ------------------------------------------------------------------------ [2007-10-23 00:18:42] josh at mykoala dot com About to celebrate the two-year anniversary of this one, woo! =) ------------------------------------------------------------------------ [2007-06-28 20:14:39] [EMAIL PROTECTED] Georg, reassign to someone else if this is not for you. :) ------------------------------------------------------------------------ [2007-05-08 21:36:09] bugs dot php at david-salisbury dot co dot uk I've experienced this behaviour on the latest PHP5 CVS (built May 8 2007 22:31:22) running in Apache 2.0.59 as mod_php5. Further reproduce code if necessary: <?php $m = new mysqli(); $m->init(); $m->real_connect('localhost', 'root', 'pass', 'dbname'); $m->real_connect('localhost', 'root', 'pass', 'dbname'); $m->real_connect('localhost', 'root', 'pass', 'dbname'); ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39457 -- Edit this bug report at http://bugs.php.net/?id=39457&edit=1
