On 2008-02-12 20:04, Hannes Magnusson wrote:
On Feb 12, 2008 11:24 AM, Felipe Pena <[EMAIL PROTECTED]> wrote:
felipe          Tue Feb 12 10:24:35 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/mysql  php_mysql.c
  Log:
  MFB: Fixed Bug #44094 (SEGFAULT when using mysql_connect())

http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.20&r2=1.213.2.6.2.21&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.20 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.21
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.20        Sun Jan 20 14:13:11 2008
+++ php-src/ext/mysql/php_mysql.c       Tue Feb 12 10:24:35 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */

-/* $Id: php_mysql.c,v 1.213.2.6.2.20 2008/01/20 14:13:11 bjori Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.21 2008/02/12 10:24:35 felipe Exp $ */

 /* TODO:
  *
@@ -556,7 +556,7 @@
                hashed_details_length = spprintf(&hashed_details, 0, 
"mysql__%s_", user);
                client_flags = CLIENT_INTERACTIVE;
        } else {
-               if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!ll", 
&host_and_port, &host_len,
+               if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!bl", 
&host_and_port, &host_len,
                                                                        &user, 
&user_len, &passwd, &passwd_len,
                                                                        &new_link, 
&client_flags)==FAILURE) {
                        return;

Won't this break the client_flags parameter for mysql_pconnect()?
Beyond my knowledge, but I really hope it doesn't.

(and you seem to have forgotten to add a NEWS entry for this fix)
I don't think it's appropriate. 5.2.5 did not have this problem, only snapshots were affected.
I'm suspecting this commit might have broken it (but I haven't verified):
----
iliaa           Thu Dec 20 00:31:49 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/mysql  php_mysql.c
    /php-src    NEWS
  Log:

MFB: Fixed bug #43635 (mysql extension ingores INI settings on NULL values
  passed to mysql_connect())
-----

--
Christian Hoffmann

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to