andrey                                   Fri, 14 Jan 2011 15:37:49 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=307481

Log:
fix more parameter stuff, now it is complete

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-01-14 15:10:09 UTC 
(rev 307480)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-01-14 15:37:49 UTC 
(rev 307481)
@@ -762,6 +762,7 @@
                }
                if (!passwd) {
                        passwd = MySG(default_password);
+                       passwd_len = passwd? strlen(passwd):0;
                }

                /* disable local infile option for open_basedir */
@@ -896,7 +897,7 @@
 #ifndef MYSQL_USE_MYSQLND
                                        if (mysql_real_connect(mysql->conn, 
host, user, passwd, NULL, port, socket, client_flags)==NULL)
 #else
-                                       if (mysqlnd_connect(mysql->conn, host, 
user, passwd, 0, NULL, 0, port, socket, client_flags TSRMLS_CC) == NULL)
+                                       if (mysqlnd_connect(mysql->conn, host, 
user, passwd, passwd_len, NULL, 0, port, socket, client_flags TSRMLS_CC) == 
NULL)
 #endif
                                        {
                                                php_error_docref(NULL 
TSRMLS_CC, E_WARNING, "Link to server lost, unable to reconnect");
@@ -975,7 +976,7 @@
 #ifndef MYSQL_USE_MYSQLND
                if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, 
port, socket, client_flags)==NULL)
 #else
-               if (mysqlnd_connect(mysql->conn, host, user, passwd, 0, NULL, 
0, port, socket, client_flags TSRMLS_CC) == NULL)
+               if (mysqlnd_connect(mysql->conn, host, user, passwd, 
passwd_len, NULL, 0, port, socket, client_flags TSRMLS_CC) == NULL)
 #endif
                {
                        /* Populate connect error globals so that the error 
functions can read them */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to