#41159 [Opn->Csd]: mysql_pconnect() to check flags param, too

From: Date: Sun, 22 Apr 2007 15:19:15 +0000
Subject: #41159 [Opn->Csd]: mysql_pconnect() to check flags param, too
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-111779@lists.php.net to get a copy of this message
ID: 41159 Updated by: iliaa@php.net Reported By: zizka at seznam dot cz -Status: Open +Status: Closed Bug Type: MySQL related Operating System: All PHP Version: 5.2.1 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-04-22 04:09:01] zizka at seznam dot cz Description: ------------ mysql_pconnect() tries to reuse an exisiting connection with the same host/port/username/password from connection pool. This causes PHP programmers wonder why their application do not behave as they should after changing the flags in their code (like here: http://bugs.php.net/bug.php?id=29763 ). The actual solution is to restart PHP's container or MySQL or KILL the PHP's threads in MySQL - all of it sometimes unavailable (commercial hosting). So I believe mysql_pconnect() should check flags parameter, too. Reproduce code: --------------- $resA = mysql_pconnect('localhost','test','test'); $resB = mysql_pconnect('localhost','test','test', 131072); echo "A: $resA B: $resB"; Expected result: ---------------- Different connections. Actual result: -------------- Same pooled connection. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41159&edit=1

« previous php.bugs (#111779) next »